Skip to content

Commit

Permalink
Don't generate pet number twice on tame.
Browse files Browse the repository at this point in the history
It's already generated and set as the entry of the ObjectGuid in CreateBaseAtCreature. Thanks to celguar for noticing this.
  • Loading branch information
ratkosrb committed Dec 24, 2023
1 parent dd123f7 commit b1e49ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3949,7 +3949,7 @@ void Spell::EffectTameCreature(SpellEffectIndex /*effIdx*/)
return;
}

pet->GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
pet->GetCharmInfo()->SetPetNumber(pet->GetObjectGuid().GetEntry(), true);
pet->GetCharmInfo()->SetReactState(REACT_DEFENSIVE);
pet->InitializeDefaultName();
pet->AIM_Initialize();
Expand Down

0 comments on commit b1e49ba

Please sign in to comment.