mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 21:03:51 +00:00
change weapon for ranged skills
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
This commit is contained in:
parent
fe1dc5e02b
commit
6ba0edc2fb
6 changed files with 176 additions and 4 deletions
|
|
@ -1025,8 +1025,16 @@ void SpellHandler::handleSpellGo(network::Packet& packet) {
|
|||
if (!owner_.isProfessionSpell(data.spellId))
|
||||
playSpellCastSound(data.spellId);
|
||||
|
||||
// Instant melee abilities → trigger attack animation
|
||||
// Ranged auto-attack spells (Auto Shot, Shoot, Throw) complete as timed
|
||||
// casts and are NOT classified as instant melee abilities, so trigger the
|
||||
// ranged shot animation explicitly here.
|
||||
uint32_t sid = data.spellId;
|
||||
if (sid == 75 || sid == 5019 || sid == 2764) {
|
||||
if (owner_.meleeSwingCallbackRef()) owner_.meleeSwingCallbackRef()(sid);
|
||||
owner_.suppressNextMeleeSwingAnim();
|
||||
}
|
||||
|
||||
// Instant melee abilities → trigger attack animation
|
||||
bool isMeleeAbility = false;
|
||||
if (!owner_.isProfessionSpell(sid)) {
|
||||
owner_.loadSpellNameCache();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue