mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
*Do not update object visibility immediately when object is added to map.
--HG-- branch : trunk
This commit is contained in:
@@ -519,10 +519,10 @@ Map::Add(T *obj)
|
||||
DEBUG_LOG("Object %u enters grid[%u,%u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
|
||||
|
||||
//something, such as vehicle, needs to be update immediately
|
||||
//if(obj->GetTypeId() != TYPEID_UNIT)
|
||||
UpdateObjectVisibility(obj,cell,p);
|
||||
if(obj->GetTypeId() != TYPEID_UNIT)
|
||||
UpdateObjectVisibility(obj,cell,p);
|
||||
|
||||
//AddNotifier(obj);
|
||||
AddNotifier(obj);
|
||||
}
|
||||
|
||||
void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self, bool to_possessor)
|
||||
|
||||
@@ -1649,6 +1649,8 @@ TempSummon *Map::SummonCreature(uint32 entry, float x, float y, float z, float a
|
||||
Add((Creature*)summon);
|
||||
summon->InitSummon(duration);
|
||||
|
||||
ObjectAccessor::UpdateObjectVisibility(summon);
|
||||
|
||||
return summon;
|
||||
}
|
||||
|
||||
@@ -1706,6 +1708,8 @@ Vehicle* WorldObject::SummonVehicle(uint32 entry, float x, float y, float z, flo
|
||||
|
||||
map->Add((Creature*)v);
|
||||
|
||||
ObjectAccessor::UpdateObjectVisibility(v);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -1810,6 +1814,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
if(duration > 0)
|
||||
pet->SetDuration(duration);
|
||||
|
||||
ObjectAccessor::UpdateObjectVisibility(pet);
|
||||
|
||||
return pet;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ class TRINITY_DLL_SPEC Aura
|
||||
void SetAuraMaxDuration(int32 duration) { m_maxduration = duration; }
|
||||
int32 GetAuraDuration() const { return m_duration; }
|
||||
void SetAuraDuration(int32 duration);
|
||||
void RefreshAura(){ SetAuraDuration (m_maxduration); }
|
||||
inline bool IsExpired() { if(!GetAuraDuration() && !(IsPermanent() || (IsPassive()))) return true; return false;};
|
||||
void RefreshAura() { SetAuraDuration(m_maxduration); }
|
||||
bool IsExpired() const { return !GetAuraDuration() && !(IsPermanent() || IsPassive()); }
|
||||
|
||||
void SendAuraUpdate();
|
||||
uint8 GetAuraSlot() const { return m_auraSlot; }
|
||||
|
||||
Reference in New Issue
Block a user