mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10560] Remove reundenant spell store for temporary unsummoned pet.
We not use this data and now always have proeprtly save current pet when it temporary unsummoned and avoid it overwrite by another cases.
This commit is contained in:
parent
bc04ae4b4c
commit
02b51fb976
3 changed files with 2 additions and 10 deletions
|
|
@ -525,10 +525,6 @@ Player::Player (WorldSession *session): Unit(), m_mover(this), m_camera(this), m
|
|||
m_ammoDPS = 0.0f;
|
||||
|
||||
m_temporaryUnsummonedPetNumber = 0;
|
||||
//cache for UNIT_CREATED_BY_SPELL to allow
|
||||
//returning reagents for temporarily removed pets
|
||||
//when dying/logging out
|
||||
m_oldpetspell = 0;
|
||||
|
||||
////////////////////Rest System/////////////////////
|
||||
time_inn_enter=0;
|
||||
|
|
@ -17644,7 +17640,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
|
|||
if (returnreagent && pet && mode != PET_SAVE_AS_CURRENT)
|
||||
{
|
||||
//returning of reagents only for players, so best done here
|
||||
uint32 spellId = pet ? pet->GetUInt32Value(UNIT_CREATED_BY_SPELL) : m_oldpetspell;
|
||||
uint32 spellId = pet->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
|
||||
if(spellInfo)
|
||||
|
|
@ -21637,10 +21633,7 @@ void Player::UnsummonPetTemporaryIfAny()
|
|||
return;
|
||||
|
||||
if(!m_temporaryUnsummonedPetNumber && pet->isControlled() && !pet->isTemporarySummoned() )
|
||||
{
|
||||
m_temporaryUnsummonedPetNumber = pet->GetCharmInfo()->GetPetNumber();
|
||||
m_oldpetspell = pet->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
}
|
||||
|
||||
RemovePet(pet, PET_SAVE_AS_CURRENT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2691,7 +2691,6 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
// Temporary removed pet cache
|
||||
uint32 m_temporaryUnsummonedPetNumber;
|
||||
uint32 m_oldpetspell;
|
||||
|
||||
AchievementMgr m_achievementMgr;
|
||||
ReputationMgr m_reputationMgr;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10559"
|
||||
#define REVISION_NR "10560"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue