mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[12153] Remove unneeded InBattleGround() as it is already checked by GetBattleGround()
Also call OutdoorPvP handlers before instance script ones
This commit is contained in:
parent
a53ac2aca7
commit
c8814791e1
5 changed files with 15 additions and 19 deletions
|
|
@ -752,16 +752,16 @@ bool Creature::Create(uint32 guidlow, CreatureCreatePos& cPos, CreatureInfo cons
|
|||
if (!cPos.Relocate(this))
|
||||
return false;
|
||||
|
||||
// Notify the outdoor pvp script
|
||||
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(GetZoneId()))
|
||||
outdoorPvP->HandleCreatureCreate(this);
|
||||
|
||||
// Notify the map's instance data.
|
||||
// Only works if you create the object in it, not if it is moves to that map.
|
||||
// Normally non-players do not teleport to other maps.
|
||||
if (InstanceData* iData = GetMap()->GetInstanceData())
|
||||
iData->OnCreatureCreate(this);
|
||||
|
||||
// Notify the outdoor pvp script
|
||||
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(GetZoneId()))
|
||||
outdoorPvP->HandleCreatureCreate(this);
|
||||
|
||||
switch (GetCreatureInfo()->rank)
|
||||
{
|
||||
case CREATURE_ELITE_RARE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue