Core/BattlePets: Misc fixes
This commit is contained in:
@@ -27,15 +27,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.BattlePetRequestJournal)]
|
||||
void HandleBattlePetRequestJournal(BattlePetRequestJournal battlePetRequestJournal)
|
||||
{
|
||||
// TODO: Move this to BattlePetMgr::SendJournal() just to have all packets in one file
|
||||
BattlePetJournal battlePetJournal = new BattlePetJournal();
|
||||
battlePetJournal.Trap = GetBattlePetMgr().GetTrapLevel();
|
||||
|
||||
foreach (var battlePet in GetBattlePetMgr().GetLearnedPets())
|
||||
battlePetJournal.Pets.Add(battlePet.PacketInfo);
|
||||
|
||||
battlePetJournal.Slots = GetBattlePetMgr().GetSlots();
|
||||
SendPacket(battlePetJournal);
|
||||
GetBattlePetMgr().SendJournal();
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.BattlePetSetBattleSlot)]
|
||||
@@ -90,7 +82,10 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.BattlePetSummon, Processing = PacketProcessing.Inplace)]
|
||||
void HandleBattlePetSummon(BattlePetSummon battlePetSummon)
|
||||
{
|
||||
GetBattlePetMgr().SummonPet(battlePetSummon.PetGuid);
|
||||
if (_player.GetGuidValue(PlayerFields.SummonedBattlePetId) != battlePetSummon.PetGuid)
|
||||
GetBattlePetMgr().SummonPet(battlePetSummon.PetGuid);
|
||||
else
|
||||
GetBattlePetMgr().DismissPet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user