mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7809] Replace repeating "remove cooldown and send update to client" code by function call.
This commit is contained in:
parent
09046df744
commit
f117ce3420
6 changed files with 22 additions and 48 deletions
|
|
@ -1064,11 +1064,7 @@ bool ChatHandler::HandleCooldownCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
WorldPacket data( SMSG_CLEAR_COOLDOWN, (4+8) );
|
||||
data << uint32(spell_id);
|
||||
data << uint64(target->GetGUID());
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->RemoveSpellCooldown(spell_id);
|
||||
target->RemoveSpellCooldown(spell_id,true);
|
||||
PSendSysMessage(LANG_REMOVE_COOLDOWN, spell_id, target==m_session->GetPlayer() ? GetMangosString(LANG_YOU) : tNameLink.c_str());
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue