Skip to content

Commit

Permalink
Merge pull request #5049 from Xaver-DaRed/random-stuff
Browse files Browse the repository at this point in the history
[Fix] [c++] Message used when non-players start casting
  • Loading branch information
TeoTwawki authored Jan 31, 2024
2 parents eefa916 + 58f87d1 commit 110d17c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/map/ai/states/magic_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ CMagicState::CMagicState(CBattleEntity* PEntity, uint16 targid, SpellID spellid,
actionTarget.speceffect = SPECEFFECT::NONE;
actionTarget.animation = 0;
actionTarget.param = static_cast<uint16>(m_PSpell->getID());
actionTarget.messageID = 327; // starts casting
actionTarget.messageID = 327; // <caster> starts casting <spell> on <target>.

if (PEntity->objtype != TYPE_PC)
{
actionTarget.messageID = 3; // <caster> starts casting <spell>.
}

// TODO: weaponskill lua object
m_PEntity->PAI->EventHandler.triggerListener("MAGIC_START", CLuaBaseEntity(m_PEntity), CLuaSpell(m_PSpell.get()), CLuaAction(&action));
Expand Down

0 comments on commit 110d17c

Please sign in to comment.