From 6b1c85a6762e6343e5b1787db73e0b200c5af70d Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 5 Jun 2016 14:08:53 +0200 Subject: Core/PacketIO: Updated spell packets --- src/server/scripts/Commands/cs_debug.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index f0e5ba81f58..0956b25dcdc 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -214,7 +214,7 @@ public: char* fail2 = strtok(NULL, " "); uint8 failArg2 = fail2 ? (uint8)atoi(fail2) : 0; - WorldPackets::Spells::CastFailed castFailed(SMSG_CAST_FAILED); + WorldPackets::Spells::CastFailed castFailed; castFailed.CastID = ObjectGuid::Empty; castFailed.SpellID = 133; castFailed.Reason = failNum; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 0e20efb0eaf..dafe9a214d5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -286,7 +286,10 @@ public: uint32 spellId = handler->extractSpellIdFromLink((char*)args); if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId)) - Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, target, target); + { + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, target->GetMapId(), spellId, target->GetMap()->GenerateLowGuid()); + Aura::TryRefreshStackOrCreate(spellInfo, castId, MAX_EFFECT_MASK, target, target); + } return true; } @@ -918,12 +921,18 @@ public: if (player->IsInFlight() || player->IsInCombat()) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(7355); +#define SPELL_UNSTUCK_ID 7355 +#define SPELL_UNSTUCK_VISUAL 2683 + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_UNSTUCK_ID); if (!spellInfo) return false; if (Player* caster = handler->GetSession()->GetPlayer()) - Spell::SendCastResult(caster, spellInfo, ObjectGuid::Empty, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + { + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, player->GetMapId(), SPELL_UNSTUCK_ID, player->GetMap()->GenerateLowGuid()); + Spell::SendCastResult(caster, spellInfo, SPELL_UNSTUCK_VISUAL, castId, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + } return false; } -- cgit v1.2.3