mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[12734] Implemented CMSG_SET_PET_SLOT (original author @Dramacydal)
This commit is contained in:
parent
27ff3eec3f
commit
a2073779f0
6 changed files with 23 additions and 5 deletions
|
|
@ -1409,4 +1409,5 @@ void InitializeOpcodes()
|
|||
OPCODE(CMSG_REQUEST_HOTFIX, STATUS_AUTHED, PROCESS_INPLACE, &WorldSession::HandleRequestHotfix );
|
||||
OPCODE(SMSG_DB_REPLY, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
|
||||
OPCODE(CMSG_OBJECT_UPDATE_FAILED, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleObjectUpdateFailedOpcode );
|
||||
OPCODE(CMSG_SET_PET_SLOT, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleSetPetSlotOpcode );
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1426,7 +1426,8 @@ enum Opcodes
|
|||
SMSG_PVP_OPTIONS_ENABLED = 0x50A1, // 4.3.4 15595
|
||||
CMSG_REQUEST_HOTFIX = 0x2401, // 4.3.4 15595
|
||||
SMSG_DB_REPLY = 0x38A4, // 4.3.4 15595
|
||||
CMSG_OBJECT_UPDATE_FAILED = 0x3808, // 4.3.4 15595
|
||||
CMSG_OBJECT_UPDATE_FAILED = 0x3808, // 4.3.4 15595
|
||||
CMSG_SET_PET_SLOT = 0x3A04, // 4.3.4 15595
|
||||
};
|
||||
|
||||
#define MAX_OPCODE_TABLE_SIZE 0xFFFF
|
||||
|
|
|
|||
|
|
@ -34,15 +34,15 @@ enum PetType
|
|||
MAX_PET_TYPE = 5
|
||||
};
|
||||
|
||||
#define MAX_PET_STABLES 4
|
||||
#define MAX_PET_STABLES 20
|
||||
|
||||
// stored in character_pet.slot
|
||||
enum PetSaveMode
|
||||
{
|
||||
PET_SAVE_AS_DELETED = -1, // not saved in fact
|
||||
PET_SAVE_AS_CURRENT = 0, // in current slot (with player)
|
||||
PET_SAVE_FIRST_STABLE_SLOT = 1,
|
||||
PET_SAVE_LAST_STABLE_SLOT = MAX_PET_STABLES, // last in DB stable slot index (including), all higher have same meaning as PET_SAVE_NOT_IN_SLOT
|
||||
PET_SAVE_FIRST_STABLE_SLOT = 5,
|
||||
PET_SAVE_LAST_STABLE_SLOT = MAX_PET_STABLES + PET_SAVE_FIRST_STABLE_SLOT - 1, // last in DB stable slot index (including), all higher have same meaning as PET_SAVE_NOT_IN_SLOT
|
||||
PET_SAVE_NOT_IN_SLOT = 100, // for avoid conflict with stable size grow will use 100
|
||||
PET_SAVE_REAGENTS = 101 // PET_SAVE_NOT_IN_SLOT with reagents return
|
||||
};
|
||||
|
|
|
|||
|
|
@ -761,3 +761,18 @@ void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recv_data)
|
|||
|
||||
_player->SendTalentsInfoData(true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetPetSlotOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
DEBUG_LOG("CMSG_SET_PET_SLOT");
|
||||
|
||||
uint32 petNumber;
|
||||
uint8 slot;
|
||||
ObjectGuid guid;
|
||||
|
||||
recv_data >> petNumber >> slot;
|
||||
recv_data.ReadGuidMask<3, 2, 0, 7, 5, 6, 1, 4>(guid);
|
||||
recv_data.ReadGuidBytes<5, 3, 1, 7, 4, 0, 6, 2>(guid);
|
||||
|
||||
DEBUG_LOG("PetNumber: %u slot: %u guid: %s", petNumber, slot, guid.GetString().c_str());
|
||||
+}
|
||||
|
|
|
|||
|
|
@ -557,6 +557,7 @@ class MANGOS_DLL_SPEC WorldSession
|
|||
void HandlePetitionDeclineOpcode(WorldPacket& recv_data);
|
||||
void HandleOfferPetitionOpcode(WorldPacket& recv_data);
|
||||
void HandleTurnInPetitionOpcode(WorldPacket& recv_data);
|
||||
void HandleSetPetSlotOpcode(WorldPacket& recv_data);
|
||||
|
||||
void HandleGuildQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildCreateOpcode(WorldPacket& recvPacket);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12733"
|
||||
#define REVISION_NR "12734"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue