mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10074] Add IsPassive(SpellEntry*) function and use in cases wjern entry already known.
Some other small code cleanups
This commit is contained in:
parent
6ca609629c
commit
07a931e141
12 changed files with 35 additions and 33 deletions
|
|
@ -332,7 +332,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
|||
if (mover->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
// not have spell in spellbook or spell passive and not casted by client
|
||||
if (!((Player*)mover)->HasActiveSpell (spellId) || IsPassiveSpell(spellId) )
|
||||
if (!((Player*)mover)->HasActiveSpell (spellId) || IsPassiveSpell(spellInfo))
|
||||
{
|
||||
sLog.outError("World: Player %u casts spell %u which he shouldn't have", mover->GetGUIDLow(), spellId);
|
||||
//cheater? kick? ban?
|
||||
|
|
@ -343,7 +343,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
|||
else
|
||||
{
|
||||
// not have spell in spellbook or spell passive and not casted by client
|
||||
if (!((Creature*)mover)->HasSpell(spellId) || IsPassiveSpell(spellId) )
|
||||
if (!((Creature*)mover)->HasSpell(spellId) || IsPassiveSpell(spellInfo))
|
||||
{
|
||||
//cheater? kick? ban?
|
||||
recvPacket.rpos(recvPacket.wpos()); // prevent spam at ignore packet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue