mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
Merge branch 'master' into 310
Conflicts: src/game/Unit.cpp
This commit is contained in:
commit
2a8776e567
14 changed files with 196 additions and 125 deletions
|
|
@ -3072,21 +3072,28 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
|||
m_target->StopMoving();
|
||||
m_target->GetMotionMaster()->Clear();
|
||||
m_target->GetMotionMaster()->MoveIdle();
|
||||
CharmInfo *charmInfo = ((Creature*)m_target)->InitCharmInfo(m_target);
|
||||
charmInfo->InitPossessCreateSpells();
|
||||
}
|
||||
else if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)m_target)->SetClientControl(m_target, 0);
|
||||
}
|
||||
|
||||
if(CharmInfo *charmInfo = m_target->InitCharmInfo(m_target))
|
||||
charmInfo->InitPossessCreateSpells();
|
||||
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)caster)->PossessSpellInitialize();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_target->SetCharmerGUID(0);
|
||||
caster->InterruptSpell(CURRENT_CHANNELED_SPELL); // the spell is not automatically canceled when interrupted, do it now
|
||||
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)m_target)->setFactionForRace(m_target->getRace());
|
||||
((Player*)m_target)->SetClientControl(m_target, 1);
|
||||
}
|
||||
else if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
CreatureInfo const *cinfo = ((Creature*)m_target)->GetCreatureInfo();
|
||||
|
|
@ -3190,7 +3197,7 @@ void Aura::HandleModCharm(bool apply, bool Real)
|
|||
if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
((Creature*)m_target)->AIM_Initialize();
|
||||
CharmInfo *charmInfo = ((Creature*)m_target)->InitCharmInfo(m_target);
|
||||
CharmInfo *charmInfo = m_target->InitCharmInfo(m_target);
|
||||
charmInfo->InitCharmCreateSpells();
|
||||
charmInfo->SetReactState( REACT_DEFENSIVE );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue