Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: map/atcommand.c
- ===================================================================
- --- map/atcommand.c (revision 15234)
- +++ map/atcommand.c (working copy)
- @@ -7813,7 +7813,7 @@
- clif_displaymessage(fd, "fireworks sakura leaves rain nightenabled");
- clif_displaymessage(fd, "nogo noexp nobaseexp nojobexp noloot");
- clif_displaymessage(fd, "nomvploot restricted loadevent nochat partylock");
- - clif_displaymessage(fd, "guildlock");
- + clif_displaymessage(fd, "guildlock nositting");
- clif_displaymessage(fd, "");
- clif_displaymessage(fd, "Restricted mapflag: use Zones (1-7) to set a zone, 0 to turn off all zones for the map");
- return -1;
- @@ -8031,8 +8031,9 @@
- }
- else if (!strcmpi(map_flag,"guildlock")) {
- map[m].flag.guildlock=state;
- - }
- - else
- + } else if( !strcmpi(map_flag,"nositting") ) {
- + map[m].flag.nositting=state;
- + } else
- {
- clif_displaymessage(fd, "Invalid Mapflag");
- return -1;
- Index: map/battle.c
- ===================================================================
- --- map/battle.c (revision 15234)
- +++ map/battle.c (working copy)
- @@ -4024,9 +4024,9 @@
- { "bg_magic_attack_damage_rate", &battle_config.bg_magic_damage_rate, 60, 0, INT_MAX, },
- { "bg_misc_attack_damage_rate", &battle_config.bg_misc_damage_rate, 60, 0, INT_MAX, },
- { "bg_flee_penalty", &battle_config.bg_flee_penalty, 20, 0, INT_MAX, },
- + { "can_sit_anywhere", &battle_config.can_sit_anywhere, 0, 99, INT_MAX, },
- };
- -
- int battle_set_value(const char* w1, const char* w2)
- {
- int val = config_switch(w2);
- Index: map/battle.h
- ===================================================================
- --- map/battle.h (revision 15234)
- +++ map/battle.h (working copy)
- @@ -497,6 +497,7 @@
- int bg_magic_damage_rate;
- int bg_misc_damage_rate;
- int bg_flee_penalty;
- + int can_sit_anywhere;
- } battle_config;
- void do_init_battle(void);
- Index: map/clif.c
- ===================================================================
- --- map/clif.c (revision 15234)
- +++ map/clif.c (working copy)
- @@ -9662,6 +9662,13 @@
- break;
- }
- + if( sd->bl.m >= 0 && map[sd->bl.m].flag.nositting
- + && (pc_isGM(sd) < battle_config.can_sit_anywhere) )
- + {
- + clif_message(&sd->bl, "You can't sit in this map!");
- + return;
- + }
- +
- if(pc_issit(sd)) {
- //Bugged client? Just refresh them.
- clif_sitting(&sd->bl);
- Index: map/map.h
- ===================================================================
- --- map/map.h (revision 15234)
- +++ map/map.h (working copy)
- @@ -485,6 +485,7 @@
- unsigned guildlock :1;
- unsigned src4instance : 1; // To flag this map when it's used as a src map for instances
- unsigned reset :1; // [Daegaladh]
- + unsigned nositting : 1;
- } flag;
- struct point save;
- struct npc_data *npc[MAX_NPC_PER_MAP];
- Index: map/npc.c
- ===================================================================
- --- map/npc.c (revision 15234)
- +++ map/npc.c (working copy)
- @@ -3116,6 +3116,8 @@
- map[m].flag.guildlock=state;
- else if (!strcmpi(w3,"reset"))
- map[m].flag.reset=state;
- + else if (!strcmpi(w3,"nositting"))
- + map[m].flag.nositting=state;
- else
- ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));
- Index: map/script.c
- ===================================================================
- --- map/script.c (revision 15234)
- +++ map/script.c (working copy)
- @@ -361,7 +361,8 @@
- MF_MONSTER_NOTELEPORT,
- MF_PVP_NOCALCRANK, //50
- MF_BATTLEGROUND,
- - MF_RESET
- + MF_RESET,
- + MF_NOSITTING
- };
- const char* script_op2name(int op)
- @@ -9659,7 +9660,8 @@
- case MF_MONSTER_NOTELEPORT: script_pushint(st,map[m].flag.monster_noteleport); break;
- case MF_PVP_NOCALCRANK: script_pushint(st,map[m].flag.pvp_nocalcrank); break;
- case MF_BATTLEGROUND: script_pushint(st,map[m].flag.battleground); break;
- - case MF_RESET: script_pushint(st,map[m].flag.reset); break;
- + case MF_RESET: script_pushint(st,map[m].flag.reset); break;
- + case MF_NOSITTING: script_pushint(st,map[m].flag.nositting); break;
- }
- }
- @@ -9729,7 +9731,8 @@
- case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=1; break;
- case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=1; break;
- case MF_BATTLEGROUND: map[m].flag.battleground = (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break;
- - case MF_RESET: map[m].flag.reset=1; break;
- + case MF_RESET: map[m].flag.reset=1; break;
- + case MF_NOSITTING: map[m].flag.nositting = 1; break;
- }
- }
- @@ -9796,7 +9799,8 @@
- case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=0; break;
- case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=0; break;
- case MF_BATTLEGROUND: map[m].flag.battleground=0; break;
- - case MF_RESET: map[m].flag.reset=0; break;
- + case MF_RESET: map[m].flag.reset=0; break;
- + case MF_NOSITTING: map[m].flag.nositting = 0; break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement