Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index c76e110..11917cf 100644
- --- a/zone/spawn2.h
- +++ b/zone/spawn2.h
- @@ -101,7 +101,8 @@ public:
- DoNothing = 0,
- DoDepop = 1,
- DoRepop = 2,
- - //... 3...9 reserved for future use
- + DoRepopKeepTimer = 3,
- + //... 4...9 reserved for future use
- DoSignalMin = 10 //any number above this value is used as
- //a base for the signal ID sent. e.g.
- // value 12 sends signal id 2
- index c1355b5..e0b5e91 100644
- --- a/zone/spawn2.cpp
- +++ b/zone/spawn2.cpp
- @@ -482,6 +482,7 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
- return; //no change
- }
- + uint32 timer_remaining = timer.GetRemainingTime();
- switch(c.on_change) {
- case SpawnCondition::DoNothing:
- //that was easy.
- @@ -499,6 +500,13 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
- npcthis->Depop(false); //remove the current mob
- Repop(); //repop
- break;
- + case SpawnCondition::DoRepopKeepTimer:
- + _log(SPAWNS__CONDITIONS, "Spawn2 %d: Our condition is now %s. Preforming a repop.", spawn2_id, new_state?"enabed":"disabled");
- + if(npcthis != nullptr)
- + npcthis->Depop(false); //remove the current mob
- + if (timer_remaining < 100 ) // if it is < 100 just repop, otherwise respect timer and no repop
- + Repop();
- + break;
- default:
- if(c.on_change < SpawnCondition::DoSignalMin) {
- _log(SPAWNS__CONDITIONS, "Spawn2 %d: Our condition is now %s. Invalid on-change action %d.", spawn2_id, new_state?"enabed":"disabled", c.on_change);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement