Fix OnSpellTile check (#3021)
This commit is contained in:
parent
2d81357069
commit
6b8b6ba77b
2 changed files with 2 additions and 4 deletions
|
|
@ -979,8 +979,6 @@ DWORD OnSpellTile(const TCmd *pCmd, Player &player)
|
|||
return sizeof(message);
|
||||
if (message.wParam2 > RSPLTYPE_INVALID)
|
||||
return sizeof(message);
|
||||
if (message.wParam3 > static_cast<int>(Direction::SouthEast))
|
||||
return sizeof(message);
|
||||
|
||||
auto spell = static_cast<spell_id>(message.wParam1);
|
||||
if (currlevel == 0 && !spelldata[spell].sTownSpell) {
|
||||
|
|
@ -992,7 +990,7 @@ DWORD OnSpellTile(const TCmd *pCmd, Player &player)
|
|||
player.destAction = ACTION_SPELL;
|
||||
player.destParam1 = position.x;
|
||||
player.destParam2 = position.y;
|
||||
player.destParam3 = static_cast<Direction>(message.wParam3);
|
||||
player.destParam4 = message.wParam3;
|
||||
player._pSpell = spell;
|
||||
player._pSplType = static_cast<spell_type>(message.wParam2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue