Skip to content
Permalink
Browse files

Server/PacketIO: Update SMSG_CLEAR_COOLDOWN, SMSG_COOLDOWN_EVENT and …

…enable SMSG_ITEM_COOLDOWN

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information...
AriDEV committed Aug 11, 2019
1 parent ebd3aee commit 33dce473b8692abd0e1b345391d59d96f0cac423
Showing with 15 additions and 25 deletions.
  1. +11 −22 src/server/game/Entities/Player/Player.cpp
  2. +4 −3 src/server/game/Server/Protocol/Opcodes.cpp
@@ -23287,27 +23287,10 @@ void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
ObjectGuid guid = GetGUID();

WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);

data.WriteBit(guid[3]);
data.WriteBit(guid[6]);
data.WriteBit(guid[2]);
data.WriteBit(0); // unk
data.WriteBit(guid[7]);
data.WriteBit(guid[0]);
data.WriteBit(guid[1]);
data.WriteBit(guid[5]);
data.WriteBit(guid[4]);

data.WriteByteSeq(guid[0]);
data.WriteByteSeq(guid[1]);
data.WriteByteSeq(guid[2]);
data.WriteByteSeq(guid[7]);
data.WriteByteSeq(guid[3]);
data.WriteByteSeq(guid[6]);
data.WriteByteSeq(guid[5]);
data.WriteGuidMask(guid, 4, 7, 1, 5, 6, 0, 2, 3);
data.WriteGuidBytes(guid, 5, 7);
data << uint32(spellInfo->Id);
data.WriteByteSeq(guid[4]);

data.WriteGuidBytes(guid, 3, 1, 2, 4, 6, 0);
SendDirectMessage(&data);
}

@@ -27256,9 +27239,15 @@ void Player::RemoveAtLoginFlag(AtLoginFlags flags, bool persist /*= false*/)

void Player::SendClearCooldown(uint32 spell_id, Unit* target)
{
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
ObjectGuid CasterGUID = target->GetGUID();
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8+1);
data.WriteGuidMask(CasterGUID, 3, 6, 2);
data.WriteBit(0); // ClearOnHold
data.WriteGuidMask(CasterGUID, 7, 0, 1, 5, 4);
data.FlushBits();
data.WriteGuidBytes(CasterGUID, 0, 1, 2, 7, 3, 6, 5);
data << uint32(spell_id);
data << uint64(target->GetGUID());
data.WriteGuidBytes(CasterGUID, 4);
SendDirectMessage(&data);
}

@@ -734,13 +734,14 @@ void OpcodeTable::InitializeServerTable()
DEFINE_OPCODE_HANDLER(SMSG_CHAT_PLAYER_AMBIGUOUS, 0x061A, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CHAT_PLAYER_NOT_FOUND, 0x1082, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CHAT_RESTRICTED, 0x1A3B, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_COOLDOWN, 0x162A, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_COOLDOWNS, 0x1458, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_TARGET, 0x1061, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CLIENTCACHE_VERSION, 0x002A, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CLIENT_CONTROL_UPDATE, 0x1043, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CONTACT_LIST, 0x1F22, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CONVERT_RUNE, 0x1A1B, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_COOLDOWN_EVENT, 0x162A, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_COOLDOWN_EVENT, 0x1163, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, 0x1A3A, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CORPSE_NOT_IN_INSTANCE, 0x089E, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_CORPSE_QUERY, 0x0E0B, STATUS_NEVER ); // 5.4.8 18414
@@ -836,6 +837,8 @@ void OpcodeTable::InitializeServerTable()
DEFINE_OPCODE_HANDLER(SMSG_INSTANCE_RESET, 0x160F, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_INSTANCE_RESET_FAILED, 0x0026, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_INVENTORY_CHANGE_FAILURE, 0x0C1E, STATUS_NEVER ); // 5.4.8 18414

DEFINE_OPCODE_HANDLER(SMSG_ITEM_COOLDOWN, 0x1904, STATUS_NEVER ); // 5.4.8 18414 // LEGACY!
DEFINE_OPCODE_HANDLER(SMSG_ITEM_ENCHANT_TIME_UPDATE, 0x10A2, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_ITEM_EXPIRE_PURCHASE_REFUND, 0x0E33, STATUS_NEVER ); // 5.4.8 18414
DEFINE_OPCODE_HANDLER(SMSG_ITEM_PURCHASE_REFUND_RESULT, 0x049E, STATUS_NEVER ); // 5.4.8 18414
@@ -1160,7 +1163,6 @@ void OpcodeTable::InitializeServerTable()
DEFINE_OPCODE_HANDLER(SMSG_CHAT_SERVER_RECONNECTED, 0x0A2E, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_CHAT_WRONG_FACTION, 0x0000, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_BOSS_EMOTES, 0x062B, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_COOLDOWN, 0x0000, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0x0000, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_COMBAT_EVENT_FAILED, 0x18C3, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_COMMENTATOR_PARTY_INFO, 0x0000, STATUS_UNHANDLED);
@@ -1235,7 +1237,6 @@ void OpcodeTable::InitializeServerTable()
DEFINE_OPCODE_HANDLER(SMSG_INVALIDATE_PLAYER, 0x102E, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_INVALID_PROMOTION_CODE, 0x1A0E, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_ITEM_ADD_PASSIVE, 0x161A, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_ITEM_COOLDOWN, 0x0000, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_ITEM_REMOVE_PASSIVE, 0x0A2F, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_ITEM_SEND_PASSIVE, 0x122F, STATUS_UNHANDLED);
DEFINE_OPCODE_HANDLER(SMSG_ITEM_TEXT_QUERY_RESPONSE, 0x0000, STATUS_UNHANDLED);

0 comments on commit 33dce47

Please sign in to comment.
You can’t perform that action at this time.