mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[7531] Fixed basic functionality for player's casted SPELL_AURA_MOD_POSSESS (like priest spell 605)
This commit is contained in:
parent
8fa0ef7ab9
commit
b8b79d67ad
2 changed files with 12 additions and 3 deletions
|
|
@ -3060,8 +3060,15 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
m_target->SetCharmerGUID(GetCasterGUID());
|
m_target->SetCharmerGUID(GetCasterGUID());
|
||||||
m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,caster->getFaction());
|
m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,caster->getFaction());
|
||||||
|
|
||||||
caster->SetCharm(m_target);
|
caster->SetCharm(m_target);
|
||||||
|
|
||||||
|
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
((Player*)caster)->SetFarSightGUID(m_target->GetGUID());
|
||||||
|
((Player*)caster)->SetClientControl(m_target, 1);
|
||||||
|
}
|
||||||
|
|
||||||
m_target->CombatStop();
|
m_target->CombatStop();
|
||||||
m_target->DeleteThreatList();
|
m_target->DeleteThreatList();
|
||||||
if(m_target->GetTypeId() == TYPEID_UNIT)
|
if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||||
|
|
@ -3094,11 +3101,15 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
||||||
|
|
||||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
|
((Player*)caster)->SetFarSightGUID(0);
|
||||||
|
((Player*)caster)->SetClientControl(m_target,0);
|
||||||
|
|
||||||
WorldPacket data(SMSG_PET_SPELLS, 8+4);
|
WorldPacket data(SMSG_PET_SPELLS, 8+4);
|
||||||
data << uint64(0);
|
data << uint64(0);
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
((Player*)caster)->GetSession()->SendPacket(&data);
|
((Player*)caster)->GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_target->GetTypeId() == TYPEID_UNIT)
|
if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||||
{
|
{
|
||||||
((Creature*)m_target)->AIM_Initialize();
|
((Creature*)m_target)->AIM_Initialize();
|
||||||
|
|
@ -3107,8 +3118,6 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
||||||
((Creature*)m_target)->AI()->AttackStart(caster);
|
((Creature*)m_target)->AI()->AttackStart(caster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
|
||||||
((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleModPossessPet(bool apply, bool Real)
|
void Aura::HandleModPossessPet(bool apply, bool Real)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7530"
|
#define REVISION_NR "7531"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue