فهرست منبع

Implemented mapflag nolockon correctly

Fixed #1736
Thanks to @GrumpyLittlePanda for reporting and @Playtester for pointing me into the right direction.
Lemongrass3110 8 سال پیش
والد
کامیت
e2eadcfbd8
4فایلهای تغییر یافته به همراه11 افزوده شده و 3 حذف شده
  1. 1 2
      doc/mapflags.txt
  2. 8 0
      npc/re/mapflag/nolockon.txt
  3. 1 0
      npc/re/scripts_mapflags.conf
  4. 1 1
      src/map/clif.c

+ 1 - 2
doc/mapflags.txt

@@ -222,8 +222,7 @@ Disables mine effects on a map.
 
 *nolockon
 
-Disables locking on a map.
-[More information needed.]
+Disables attacking another player without holding shift or using /ns on a map.
 
 ---------------------------------------
 

+ 8 - 0
npc/re/mapflag/nolockon.txt

@@ -0,0 +1,8 @@
+//===== rAthena Script =======================================
+//= Mapflag: Nolockon
+//===== Description: ========================================= 
+//= Disables attacks on another player on clientside
+//= without using shift or /ns
+//===== Changelogs: ==========================================
+//= 0.1 Created empty file for further usage [Lemongrass]
+//============================================================

+ 1 - 0
npc/re/scripts_mapflags.conf

@@ -6,6 +6,7 @@ npc: npc/re/mapflag/gvg.txt
 npc: npc/re/mapflag/hidemobhpbar.txt
 npc: npc/re/mapflag/nobranch.txt
 npc: npc/re/mapflag/noicewall.txt
+npc: npc/re/mapflag/nolockon.txt
 npc: npc/re/mapflag/nomemo.txt
 npc: npc/re/mapflag/nopenalty.txt
 npc: npc/re/mapflag/nosave.txt

+ 1 - 1
src/map/clif.c

@@ -6235,7 +6235,7 @@ void clif_map_property(struct block_list *bl, enum map_property property, enum s
 		((map[bl->m].flag.battleground || map_flag_gvg(bl->m)?1:0)<<1)|// GUILD - Show attack cursor on non-guild members (GvG)
 		((map[bl->m].flag.battleground || map_flag_gvg2(bl->m)?1:0)<<2)|// SIEGE - Show emblem over characters heads when in GvG (WoE castle)
 		((map[bl->m].flag.nomineeffect || !map_flag_gvg2(bl->m)?0:1)<<3)| // USE_SIMPLE_EFFECT - Automatically enable /mineffect
-		((map[bl->m].flag.nolockon?1:0)<<4)| // DISABLE_LOCKON - Unknown (By the name it might disable cursor lock-on)
+		((map[bl->m].flag.nolockon?0:1)<<4)| // DISABLE_LOCKON - Only allow attacks on other players with shift key or /ns active
 		((map[bl->m].flag.pvp?1:0)<<5)| // COUNT_PK - Show the PvP counter
 		((map[bl->m].flag.partylock?1:0)<<6)| // NO_PARTY_FORMATION - Prevents party creation/modification (Might be used for instance dungeons)
 		((map[bl->m].flag.battleground?1:0)<<7)| // BATTLEFIELD - Unknown (Does something for battlegrounds areas)