mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
Updated SMSG_CAST_FAILED with some new information.
This commit is contained in:
parent
a427718cab
commit
c814e10481
1 changed files with 31 additions and 13 deletions
|
|
@ -3645,12 +3645,12 @@ void Spell::SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 ca
|
|||
switch (result)
|
||||
{
|
||||
case SPELL_FAILED_NOT_READY:
|
||||
data << uint32(0); // unknown, value 1 seen for 14177
|
||||
data << uint32(0); // unknown, value 1 seen for 14177 (update cooldowns on client flag)
|
||||
break;
|
||||
case SPELL_FAILED_REQUIRES_SPELL_FOCUS:
|
||||
data << uint32(spellInfo->RequiresSpellFocus);
|
||||
data << uint32(spellInfo->RequiresSpellFocus); // SpellFocusObject.dbc id
|
||||
break;
|
||||
case SPELL_FAILED_REQUIRES_AREA:
|
||||
case SPELL_FAILED_REQUIRES_AREA: // AreaTable.dbc id
|
||||
// hardcode areas limitation case
|
||||
switch(spellInfo->Id)
|
||||
{
|
||||
|
|
@ -3673,26 +3673,44 @@ void Spell::SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 ca
|
|||
case SPELL_FAILED_TOTEMS:
|
||||
for(int i = 0; i < MAX_SPELL_TOTEMS; ++i)
|
||||
if(spellInfo->Totem[i])
|
||||
data << uint32(spellInfo->Totem[i]);
|
||||
data << uint32(spellInfo->Totem[i]); // client needs only one id, not 2...
|
||||
break;
|
||||
case SPELL_FAILED_TOTEM_CATEGORY:
|
||||
for(int i = 0; i < MAX_SPELL_TOTEM_CATEGORIES; ++i)
|
||||
if(spellInfo->TotemCategory[i])
|
||||
data << uint32(spellInfo->TotemCategory[i]);
|
||||
data << uint32(spellInfo->TotemCategory[i]);// client needs only one id, not 2...
|
||||
break;
|
||||
case SPELL_FAILED_EQUIPPED_ITEM_CLASS:
|
||||
data << uint32(spellInfo->EquippedItemClass);
|
||||
data << uint32(spellInfo->EquippedItemSubClassMask);
|
||||
//data << uint32(spellInfo->EquippedItemInventoryTypeMask);
|
||||
break;
|
||||
case SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND:
|
||||
case SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND:
|
||||
// same data as SPELL_FAILED_EQUIPPED_ITEM_CLASS ?
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
data << uint32(spellInfo->EquippedItemClass);
|
||||
data << uint32(spellInfo->EquippedItemSubClassMask);
|
||||
break;
|
||||
case SPELL_FAILED_PREVENTED_BY_MECHANIC:
|
||||
data << uint32(0); // unknown, mechanic mask?
|
||||
data << uint32(0); // SpellMechanic.dbc id
|
||||
break;
|
||||
case SPELL_FAILED_CUSTOM_ERROR:
|
||||
data << uint32(0); // custom error id (see enum SpellCastResultCustom)
|
||||
break;
|
||||
case SPELL_FAILED_NEED_EXOTIC_AMMO:
|
||||
data << uint32(spellInfo->EquippedItemSubClassMask);// seems correct...
|
||||
break;
|
||||
case SPELL_FAILED_REAGENTS:
|
||||
data << uint32(0); // item id
|
||||
break;
|
||||
case SPELL_FAILED_NEED_MORE_ITEMS:
|
||||
data << uint32(0); // item id
|
||||
data << uint32(0); // item count?
|
||||
break;
|
||||
case SPELL_FAILED_MIN_SKILL:
|
||||
data << uint32(0); // SkillLine.dbc id
|
||||
data << uint32(0); // required skill value
|
||||
break;
|
||||
case SPELL_FAILED_TOO_MANY_OF_ITEM:
|
||||
data << uint32(0); // ItemLimitCategory.dbc id
|
||||
break;
|
||||
case SPELL_FAILED_FISHING_TOO_LOW:
|
||||
data << uint32(0); // required fishing skill
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue