Violet Hold: Add crystal activation support backend to instance script.
Support is not used yet by the instance mechanic so is not usable as is --HG-- branch : trunk
This commit is contained in:
@@ -125,6 +125,8 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
uint32 uiActivationTimer;
|
||||
uint32 uiCyanigosaEventTimer;
|
||||
|
||||
std::set<uint64> trashMobs; // to kill with crystal
|
||||
|
||||
uint8 uiWaveCount;
|
||||
uint8 uiLocation;
|
||||
uint8 uiFirstBoss;
|
||||
@@ -171,6 +173,8 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
uiMainDoor = 0;
|
||||
uiTeleportationPortal = 0;
|
||||
uiSaboteurPortal = 0;
|
||||
|
||||
trashMobs.clear();
|
||||
|
||||
uiRemoveNpc = 0;
|
||||
|
||||
@@ -362,6 +366,28 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DATA_ACTIVATE_CRYSTAL:
|
||||
// Kill all mobs registered with SetData64(ADD_TRASH_MOB)
|
||||
// TODO: All visual, spells etc
|
||||
for (std::set<uint64>::const_iterator itr = trashMobs.begin(); itr != trashMobs.end(); ++itr)
|
||||
{
|
||||
Creature* pCreature = instance->GetCreature(*itr);
|
||||
if (pCreature && pCreature->isAlive())
|
||||
pCreature->Kill(pCreature);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_ADD_TRASH_MOB:
|
||||
trashMobs.insert(data);
|
||||
break;
|
||||
case DATA_DEL_TRASH_MOB:
|
||||
trashMobs.erase(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ enum Data
|
||||
DATA_NPC_PRESENCE_AT_DOOR_REMOVE,
|
||||
DATA_START_BOSS_ENCOUNTER,
|
||||
DATA_FIRST_BOSS,
|
||||
DATA_SECOND_BOSS
|
||||
DATA_SECOND_BOSS,
|
||||
DATA_ACTIVATE_CRYSTAL
|
||||
};
|
||||
|
||||
enum Data64
|
||||
@@ -76,7 +77,9 @@ enum Data64
|
||||
DATA_MAIN_DOOR,
|
||||
DATA_SINCLARI,
|
||||
DATA_TELEPORTATION_PORTAL,
|
||||
DATA_SABOTEUR_PORTAL
|
||||
DATA_SABOTEUR_PORTAL,
|
||||
DATA_ADD_TRASH_MOB,
|
||||
DATA_DEL_TRASH_MOB
|
||||
};
|
||||
|
||||
enum Bosses
|
||||
|
||||
Reference in New Issue
Block a user