diff options
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/ItemPackets.cpp | 1 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/ItemPackets.h | 3 | ||||
| -rw-r--r-- | src/server/game/Server/Protocol/Opcodes.cpp | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index cb9957f3be6..7b45462ea82 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -22727,15 +22727,10 @@ void Player::ApplyEquipCooldown(Item* pItem) if (effectData->Trigger != ITEM_SPELLTRIGGER_ON_USE) continue; - // Don't replace longer cooldowns by equip cooldown if we have any. - if (GetSpellHistory()->GetRemainingCooldown(effectData->SpellID) > 30 * IN_MILLISECONDS) - continue; - - GetSpellHistory()->AddCooldown(effectData->SpellID, pItem->GetEntry(), std::chrono::seconds(30)); - WorldPackets::Item::ItemCooldown data; data.ItemGuid = pItem->GetGUID(); data.SpellID = effectData->SpellID; + data.Cooldown = 30 * IN_MILLISECONDS; // Always 30secs? GetSession()->SendPacket(data.Write()); } } diff --git a/src/server/game/Server/Packets/ItemPackets.cpp b/src/server/game/Server/Packets/ItemPackets.cpp index 6d7fdffc73b..26dda8e646e 100644 --- a/src/server/game/Server/Packets/ItemPackets.cpp +++ b/src/server/game/Server/Packets/ItemPackets.cpp @@ -381,6 +381,7 @@ WorldPacket const* WorldPackets::Item::ItemCooldown::Write() { _worldPacket << ItemGuid; _worldPacket << uint32(SpellID); + _worldPacket << uint32(Cooldown); return &_worldPacket; } diff --git a/src/server/game/Server/Packets/ItemPackets.h b/src/server/game/Server/Packets/ItemPackets.h index 69a6c5ab997..d179f03b041 100644 --- a/src/server/game/Server/Packets/ItemPackets.h +++ b/src/server/game/Server/Packets/ItemPackets.h @@ -376,12 +376,13 @@ namespace WorldPackets class ItemCooldown final : public ServerPacket { public: - ItemCooldown() : ServerPacket(SMSG_ITEM_COOLDOWN, 20) { } + ItemCooldown() : ServerPacket(SMSG_ITEM_COOLDOWN, 24) { } WorldPacket const* Write() override; ObjectGuid ItemGuid; uint32 SpellID = 0; + uint32 Cooldown = 0; }; class ItemEnchantTimeUpdate final : public ServerPacket diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index f0924dbde7d..7e5fe5e5e29 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1254,7 +1254,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_INVENTORY_CHANGE_FAILURE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_IS_QUEST_COMPLETE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_CHANGED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_COOLDOWN, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_COOLDOWN, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_ENCHANT_TIME_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_EXPIRE_PURCHASE_REFUND, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_PURCHASE_REFUND_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); |
