[7980] Implement item use target requirements store and check (new table item_required_target).

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

* Also implement this table reload
* Static Spell::SendCastResult function for call not from spell code.
  Can be also used in scripts where need send explicitly spell cast error to client.
This commit is contained in:
NoFantasy 2009-06-09 00:22:51 +04:00 committed by VladimirMangos
parent 6d8867d0fc
commit 6a1b4e5729
18 changed files with 279 additions and 36 deletions

View file

@ -37,7 +37,7 @@ bool ChatHandler::HandleDebugSendSpellFailCommand(const char* args)
return false;
char* px = strtok((char*)args, " ");
if(!px)
if (!px)
return false;
uint8 failnum = (uint8)atoi(px);
@ -50,14 +50,13 @@ bool ChatHandler::HandleDebugSendSpellFailCommand(const char* args)
char* p2 = strtok(NULL, " ");
uint8 failarg2 = p2 ? (uint8)atoi(p2) : 0;
WorldPacket data(SMSG_CAST_FAILED, 5);
data << uint8(0);
data << uint32(133);
data << uint8(failnum);
if(p1 || p2)
if (p1 || p2)
data << uint32(failarg1);
if(p2)
if (p2)
data << uint32(failarg2);
m_session->SendPacket(&data);