| 890 | } |
| 891 | |
| 892 | int GameScript::invokeState(Daedalus::GEngineClasses::C_Npc* hnpc, Daedalus::GEngineClasses::C_Npc* oth, const char *name) { |
| 893 | auto& dat = vm.getDATFile(); |
| 894 | auto id = dat.getSymbolIndexByName(name); |
| 895 | if(id==size_t(-1)) |
| 896 | return 0; |
| 897 | |
| 898 | ScopeVar self (vm, vm.globalSelf(), hnpc, Daedalus::IC_Npc); |
| 899 | ScopeVar other(vm, vm.globalOther(), oth, Daedalus::IC_Npc); |
| 900 | return runFunction(id); |
| 901 | } |
| 902 | |
| 903 | int GameScript::invokeState(Npc* npc, Npc* oth, Npc* vic, ScriptFn fn) { |
| 904 | if(!fn.isValid()) |
no test coverage detected