Przeglądaj źródła

Corrected block_action behaviour (#4071)

* Corrected block_action behaviour
* reloadscript command doesn't remove PCBLOCK_IMMUNE anymore
* Corrected a typo on MorseCave.txt

Thanks to @CairoLee and @ElinhoPP !
Atemo 6 lat temu
rodzic
commit
66b8273221

+ 1 - 1
doc/script_commands.txt

@@ -6137,7 +6137,7 @@ Examples:
 *getpcblock {<account ID>};
 
 'setpcblock' command prevents/allows the player from doing the given <type> of action according
-to the <state> during the player session (note: @reloadscript also removes all <type>).
+to the <state> during the player session (note: @reloadscript removes all <type> except PCBLOCK_IMMUNE).
 The <type> values are bit-masks, multiples of <type> can be added to change the player action.
 
 The action is blocked when the <state> is true, while false allows the action again.

+ 3 - 3
npc/re/instances/MorseCave.txt

@@ -302,7 +302,7 @@ OnTouch:	// note : party member can also trigger this event
 	unittalk getcharid(3), "" + strcharinfo(0) + " : but it doesn't matter; you'll die today!";
 	sleep2 3000;
 	specialeffect2 EF_LOCKON;
-	donpcevent instance_npcname("Weakened Morroc#RZ1") + "::OnTalk1";
+	donpcevent instance_npcname("Weakened Morocc#RZ1") + "::OnTalk1";
 	setpcblock PCBLOCK_NPC, false;
 	end;
 }
@@ -400,7 +400,7 @@ OnTouch:
 		'status_battle[0] = 1;
 		donpcevent instance_npcname("#RZ Memorial Effect 1") + "::OnStart";
 		setpcblock PCBLOCK_NPC, true;
-		mapannounce 'map_rev$, "Morroc: How do you like to be separated from each other and have your bodies and minds bound?", bc_map,0xEBFF;
+		mapannounce 'map_rev$, "Morocc: How do you like to be separated from each other and have your bodies and minds bound?", bc_map,0xEBFF;
 		sleep2 3000;
 		mapannounce 'map_rev$, "Morocc: You're trespassing! Riff-raff like you have no business in here!", bc_map,0xEBFF;
 		sleep2 3000;
@@ -929,7 +929,7 @@ OnStop:
 OnTouch:
 	disablenpc instance_npcname("#Battle_3RZ1");
 	setpcblock PCBLOCK_NPC, true;
-	mapannounce 'map_rev$, "Morroc: I can't let you go unscathed!", bc_map,0xEBFF;
+	mapannounce 'map_rev$, "Morocc: I can't let you go unscathed!", bc_map,0xEBFF;
 	sleep2 3000;
 	mapannounce 'map_rev$, "Morocc: Hah hah, my Necromancer. I'll leave them to you.", bc_map,0xEBFF;
 	sleep2 3000;

+ 1 - 1
src/map/atcommand.cpp

@@ -3922,7 +3922,7 @@ ACMD_FUNC(reload) {
 		for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ){
 			pc_close_npc(pl_sd,1);
 			clif_cutin(pl_sd, "", 255);
-			pl_sd->state.block_action = 0;
+			pl_sd->state.block_action &= ~(PCBLOCK_ALL ^ PCBLOCK_IMMUNE);
 		}
 		mapit_free(iter);