1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 514edf1..2ed373a 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1423,8 +1423,12 @@ void Player:
![:S](wcf/images/smilies/unsure.png)
etDeathState(DeathState s)
// remove form before other mods to prevent incorrect stats calculation
RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
- //FIXME: is pet dismissed at dying or releasing spirit? if second, add SetDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD)
- RemovePet(PET_SAVE_REAGENTS);
+ // if is in battleground and is warlock, store summoned pet if any
+ if (InBattleGround() && getClass() == CLASS_WARLOCK)
+ UnsummonPetTemporaryIfAny();
+ else
+ //FIXME: is pet dismissed at dying or releasing spirit? if second, add SetDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD)
+ RemovePet(PET_SAVE_REAGENTS);
// remove uncontrolled pets
RemoveMiniPet();
@@ -1454,6 +1458,10 @@ void Player:
![:S](wcf/images/smilies/unsure.png)
etDeathState(DeathState s)
// restore default warrior stance
if(getClass()== CLASS_WARRIOR)
CastSpell(this,SPELL_ID_PASSIVE_BATTLE_STANCE,true);
+
+ // if is in battleground and is warlock, store summoned pet if any
+ if (InBattleGround() && getClass() == CLASS_WARLOCK)
+ ResummonPetTemporaryUnSummonedIfAny();
}
}