Skip to content

Commit

Permalink
Implemented mapflag nolockon correctly
Browse files Browse the repository at this point in the history
Fixed #1736
Thanks to @GrumpyLittlePanda for reporting and @Playtester for pointing me into the right direction.
  • Loading branch information
Lemongrass3110 committed Dec 7, 2016
1 parent 2bb92a1 commit e2eadcf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions doc/mapflags.txt
Expand Up @@ -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.

---------------------------------------

Expand Down
8 changes: 8 additions & 0 deletions 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 change: 1 addition & 0 deletions npc/re/scripts_mapflags.conf
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/map/clif.c
Expand Up @@ -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)
Expand Down

4 comments on commit e2eadcf

@GrumpyLittlePanda
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot force the DISABLE_LOCKON in all maps, youll have swordcursor on all friendly non party members even in town.

@hurtsky
Copy link

@hurtsky hurtsky commented on e2eadcf Dec 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrumpyLittlePanda just disable /ns? i think this fix already work correctly

@GrumpyLittlePanda
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hurtsky the follow up fixed it :)

@hurtsky
Copy link

@hurtsky hurtsky commented on e2eadcf Dec 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrumpyLittlePanda i actually merged to latest one... 👍

Please sign in to comment.