mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[9013] shapeshift spells
some shapeshift forms will give the player spells so we need to tell the server that the player has those new spells else he can't cast them since the server is thinking the player is cheating ps forms with spells: FORM_GHOUL FORM_THARONJA_SKELETON FORM_TEST_OF_STRENGTH FORM_BLB_PLAYER FORM_TEST FORM_ZOMBIE -- so this mostly won't affect any ingame experience.. but good to have this feature anyway.. :) also changed errormessage if player has no reagents for spell.. thx to nofantasy
This commit is contained in:
parent
7c4acf31e2
commit
0502de55af
7 changed files with 33 additions and 12 deletions
|
|
@ -5260,11 +5260,11 @@ SpellCastResult Spell::CheckItems()
|
|||
{
|
||||
uint32 itemid = m_CastItem->GetEntry();
|
||||
if( !p_caster->HasItemCount(itemid, 1) )
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
return SPELL_FAILED_ITEM_NOT_FOUND;
|
||||
|
||||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
if(!proto)
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
return SPELL_FAILED_ITEM_NOT_FOUND;
|
||||
|
||||
for (int i = 0; i < 5; ++i)
|
||||
if (proto->Spells[i].SpellCharges)
|
||||
|
|
@ -5380,7 +5380,7 @@ SpellCastResult Spell::CheckItems()
|
|||
{
|
||||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
if(!proto)
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
return SPELL_FAILED_REAGENTS;
|
||||
for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
{
|
||||
// CastItem will be used up and does not count as reagent
|
||||
|
|
@ -5393,7 +5393,7 @@ SpellCastResult Spell::CheckItems()
|
|||
}
|
||||
}
|
||||
if( !p_caster->HasItemCount(itemid, itemcount) )
|
||||
return SPELL_FAILED_ITEM_NOT_READY; //0x54
|
||||
return SPELL_FAILED_REAGENTS;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue