*stop combat on battleground end, so creatures won't kill players

*added enum from BGCreatures

--HG--
branch : trunk
This commit is contained in:
Rat
2009-08-14 22:09:06 +02:00
parent f37885c086
commit ce84190b5c
2 changed files with 13 additions and 2 deletions
+7 -2
View File
@@ -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)
+6
View File
@@ -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