diff options
| author | Rat <none@none> | 2009-08-14 22:09:06 +0200 |
|---|---|---|
| committer | Rat <none@none> | 2009-08-14 22:09:06 +0200 |
| commit | ce84190b5c9a6792ba90d6cdf9d248980b73c290 (patch) | |
| tree | ecf4bc0058020b13fadcfad5936cb1625dedb6e9 | |
| parent | f37885c086be2c937afa62dfde868ebbcd97d79c (diff) | |
*stop combat on battleground end, so creatures won't kill players
*added enum from BGCreatures
--HG--
branch : trunk
| -rw-r--r-- | src/game/BattleGround.cpp | 9 | ||||
| -rw-r--r-- | src/game/BattleGround.h | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 63b0560a4ea..4d07c1ee6c2 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -734,6 +734,11 @@ void BattleGround::EndBattleGround(uint32 winner) { plr->ResurrectPlayer(1.0f); plr->SpawnCorpseBones(); + }else + { + //needed cause else in av some creatures will kill the players at the end + plr->CombatStop(); + plr->getHostilRefManager().deleteReferences(); } //this line is obsolete - team is set ALWAYS @@ -1642,9 +1647,9 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float uint32 entry = 0; if (team == ALLIANCE) - entry = 13116; + entry = BG_CREATURE_ENTRY_A_SPIRITGUIDE; else - entry = 13117; + entry = BG_CREATURE_ENTRY_H_SPIRITGUIDE; Creature* pCreature = AddCreature(entry,type,team,x,y,z,o); if (!pCreature) diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 467798d7890..007f7a642dd 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -71,6 +71,12 @@ enum BattleGroundMarksCount ITEM_LOSER_COUNT = 1 }; +enum BattleGroundCreatures +{ + BG_CREATURE_ENTRY_A_SPIRITGUIDE = 13116, // alliance + BG_CREATURE_ENTRY_H_SPIRITGUIDE = 13117, // horde +}; + enum BattleGroundSpells { SPELL_WAITING_FOR_RESURRECT = 2584, // Waiting to Resurrect |
