mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Phase system development continue.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects. * Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area and multi/random target spells/aggro assistance in phased areas or target selection. * In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility. TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
This commit is contained in:
parent
0c43a425e8
commit
b5da610388
16 changed files with 223 additions and 121 deletions
|
|
@ -1022,18 +1022,10 @@ bool Object::PrintIndexError(uint32 index, bool set) const
|
|||
}
|
||||
|
||||
WorldObject::WorldObject()
|
||||
: m_mapId(0), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL),
|
||||
m_positionX(0.0f), m_positionY(0.0f), m_positionZ(0.0f), m_orientation(0.0f),
|
||||
mSemaphoreTeleport(false)
|
||||
{
|
||||
m_positionX = 0.0f;
|
||||
m_positionY = 0.0f;
|
||||
m_positionZ = 0.0f;
|
||||
m_orientation = 0.0f;
|
||||
|
||||
m_mapId = 0;
|
||||
m_InstanceId = 0;
|
||||
|
||||
m_name = "";
|
||||
|
||||
mSemaphoreTeleport = false;
|
||||
}
|
||||
|
||||
void WorldObject::_Create( uint32 guidlow, HighGuid guidhigh, uint32 mapid )
|
||||
|
|
@ -1317,7 +1309,7 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
|
|||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MessageChatLocaleCacheDo say_do(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(say_do);
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(this,say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo>, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap());
|
||||
|
|
@ -1332,7 +1324,7 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
|
|||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MessageChatLocaleCacheDo say_do(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL));
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(say_do);
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(this,say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo>, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap());
|
||||
|
|
@ -1347,7 +1339,7 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
|
|||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MessageChatLocaleCacheDo say_do(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(say_do);
|
||||
MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo> say_worker(this,say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerWorker<MaNGOS::MessageChatLocaleCacheDo>, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap());
|
||||
|
|
@ -1618,7 +1610,7 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y,
|
|||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::NearUsedPosDo u_do(*this,searcher,absAngle,selector);
|
||||
MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo> worker(u_do);
|
||||
MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo> worker(this,u_do);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, GridTypeMapContainer > grid_obj_worker(worker);
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue