mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7877] Correctly set totem PvP state at loading and owner PvP state change, including GM totem case.
* Also set PvP state in proper way at pet loading if owner in PvP state.
This commit is contained in:
parent
e0e5ed7bd8
commit
bc4611e8c0
6 changed files with 42 additions and 20 deletions
|
|
@ -4181,6 +4181,9 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
if(m_caster->IsPvP())
|
||||
NewSummon->SetPvP(true);
|
||||
|
||||
NewSummon->InitStatsForLevel(petlevel);
|
||||
NewSummon->InitPetCreateSpells();
|
||||
NewSummon->InitLevelupSpellsForLevel();
|
||||
|
|
@ -5515,6 +5518,9 @@ void Spell::EffectSummonTotem(uint32 i)
|
|||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
if(m_caster->IsPvP())
|
||||
pTotem->SetPvP(true);
|
||||
|
||||
pTotem->Summon(m_caster);
|
||||
|
||||
if(slot < MAX_TOTEM && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue