diff --git a/src/script/ScriptedNPC.cpp b/src/script/ScriptedNPC.cpp index 3c0573be27..9b5a26aa1a 100644 --- a/src/script/ScriptedNPC.cpp +++ b/src/script/ScriptedNPC.cpp @@ -43,6 +43,8 @@ ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. #include "script/ScriptedNPC.h" +#include + #include "game/Camera.h" #include "game/EntityManager.h" #include "game/NPC.h" @@ -173,6 +175,12 @@ class SpellcastCommand : public Command { long duration = -1; bool haveDuration = false; + if((context.getEntity()->ioflags & IO_ITEM) + && boost::starts_with(context.getEntity()->id().className(), "potion_")) { + // TODO(patch-scripts) Workaround for http://arx.vg/1048 + spflags |= SPELLCAST_FLAG_ORPHAN; + } + HandleFlags("kdxmsfz") { if(flg & flag('k')) {