File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -605,15 +605,15 @@ void Interactive::autoDetachNpc() {
605605bool Interactive::checkUseConditions (Npc& npc) {
606606 const bool isPlayer = npc.isPlayer ();
607607
608- auto & sc = npc. world () .script ();
608+ auto & sc = world.script ();
609609
610610 if (isPlayer) {
611611 const bool g1 = Gothic::inst ().version ().game ==1 ;
612- const size_t ItKE_lockpick = world. script () .lockPickId ();
612+ const size_t ItKE_lockpick = sc .lockPickId ();
613613 const size_t lockPickCnt = npc.inventory ().itemCount (ItKE_lockpick);
614614 const bool canLockPick = ((g1 || npc.talentSkill (TALENT_PICKLOCK)!=0 ) && lockPickCnt>0 );
615615
616- const size_t keyInst = keyInstance.empty () ? size_t (-1 ) : world. script () .findSymbolIndex (keyInstance);
616+ const size_t keyInst = keyInstance.empty () ? size_t (-1 ) : sc .findSymbolIndex (keyInstance);
617617 const bool needToPicklock = (pickLockStr.size ()>0 );
618618
619619 if (keyInst!=size_t (-1 ) && (isLockCracked || npc.itemCount (keyInst)>0 )) {
@@ -644,7 +644,7 @@ bool Interactive::checkUseConditions(Npc& npc) {
644644 }
645645
646646 if (!useWithItem.empty ()) {
647- size_t it = world. script () .findSymbolIndex (useWithItem);
647+ size_t it = sc .findSymbolIndex (useWithItem);
648648 if (it!=size_t (-1 ) && npc.itemCount (it)==0 ) {
649649 sc.printMobMissingItem (npc);
650650 return false ;
You can’t perform that action at this time.
0 commit comments