[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:
gvcoman
2008-11-05 20:51:05 -06:00
parent 8d331f2b10
commit 44bdb135f4
41 changed files with 1105 additions and 374 deletions

View File

@@ -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