void LuaNPCScript::characterNear(Character *npc, Character *enemy) { init_functions(); try { World::get()->setCurrentScript(this); #ifdef MAJORSCRIPTLOG //CWorld::get()->monitoringClientList->sendCommand( new SendMessageTS("enemyNear called for: " + Monster->name,3)); Logger::writeMessage("scripts","characterNear called for: " + npc->name); #endif fuse_ptr<Character> fuse_npc(npc); fuse_ptr<Character> fuse_enemy(enemy); call("characterNear")(fuse_npc, fuse_enemy); } catch (luabind::error &e) { writeErrorMsg(); //CWorld::get()->monitoringClientList->sendCommand( new SendMessageTS("Error: enemyNear called for: " + Monster->name + " " + e.what(),3)); } }
bool LuaMonsterScript::enemyNear(Character *Monster, Character *enemy) { character_ptr fuse_Monster(Monster); character_ptr fuse_enemy(enemy); return callEntrypoint<bool>("enemyNear", fuse_Monster, fuse_enemy); }
void LuaNPCScript::characterNear(Character *enemy) { character_ptr fuse_thisnpc(_thisnpc); character_ptr fuse_enemy(enemy); callEntrypoint("characterNear", fuse_thisnpc, fuse_enemy); }