mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
[svn] Implemented player on player and player on creature possession:
* Implemented packet and vision forwarding through possessed units * Added new OnPossess script call alerting scripts on when possession is applied/removed * Moved fall damage and fall under map calculations into the Player class * Added new PossessedAI that is applied only while possession on creature is active * Implemented summon possessed spell effect * Fixed Eyes of the Beast --HG-- branch : trunk
This commit is contained in:
@@ -622,8 +622,30 @@ void
|
||||
ObjectAccessor::WorldObjectChangeAccumulator::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
if(iter->getSource()->HaveAtClient(&i_object))
|
||||
ObjectAccessor::_buildPacket(iter->getSource(), &i_object, i_updateDatas);
|
||||
{
|
||||
BuildPacket(iter->getSource());
|
||||
if (iter->getSource()->isPossessedByPlayer())
|
||||
BuildPacket((Player*)iter->getSource()->GetCharmer());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ObjectAccessor::WorldObjectChangeAccumulator::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
if (iter->getSource()->isPossessedByPlayer())
|
||||
BuildPacket((Player*)iter->getSource()->GetCharmer());
|
||||
}
|
||||
|
||||
void
|
||||
ObjectAccessor::WorldObjectChangeAccumulator::BuildPacket(Player* plr)
|
||||
{
|
||||
// Only send update once to a player
|
||||
if (plr_list.find(plr->GetGUID()) == plr_list.end() && plr->HaveAtClient(&i_object))
|
||||
{
|
||||
ObjectAccessor::_buildPacket(plr, &i_object, i_updateDatas);
|
||||
plr_list.insert(plr->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user