mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Merge branch 'master' into 303
Conflicts: src/game/WorldSocket.cpp src/shared/Database/DBCStructure.h src/shared/Database/DBCfmt.cpp
This commit is contained in:
commit
6fae544fbe
23 changed files with 280 additions and 118 deletions
|
|
@ -10258,9 +10258,26 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
|
|||
|
||||
if(pProto && isInCombat()&& pProto->Class == ITEM_CLASS_WEAPON && m_weaponChangeTimer == 0)
|
||||
{
|
||||
m_weaponChangeTimer = DEFAULT_SWITCH_WEAPON;
|
||||
uint32 cooldownSpell = SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s;
|
||||
|
||||
if (getClass() == CLASS_ROGUE)
|
||||
m_weaponChangeTimer = ROGUE_SWITCH_WEAPON;
|
||||
cooldownSpell = SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s;
|
||||
|
||||
SpellEntry const* spellProto = sSpellStore.LookupEntry(cooldownSpell);
|
||||
|
||||
if (!spellProto)
|
||||
sLog.outError("Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
|
||||
else
|
||||
{
|
||||
m_weaponChangeTimer = spellProto->StartRecoveryTime;
|
||||
|
||||
WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4);
|
||||
data << uint64(GetGUID());
|
||||
data << uint8(1);
|
||||
data << uint32(cooldownSpell);
|
||||
data << uint32(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue