diff options
author | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-09-20 23:46:48 +0000 |
---|---|---|
committer | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-09-20 23:46:48 +0000 |
commit | dbc3e0878510f5d8ae7d3aca21607bfa2648b421 (patch) | |
tree | 87867007c2154b99b44924c907ecfbf553c6ebf1 | |
parent | b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8 (diff) | |
download | hercules-dbc3e0878510f5d8ae7d3aca21607bfa2648b421.tar.gz hercules-dbc3e0878510f5d8ae7d3aca21607bfa2648b421.tar.bz2 hercules-dbc3e0878510f5d8ae7d3aca21607bfa2648b421.tar.xz hercules-dbc3e0878510f5d8ae7d3aca21607bfa2648b421.zip |
* Applied map flag update patch provided by Daegaladh. Will mess with custom restricted items.
- Adds a reset mapflag which is checked when using the Neuralizer.
- Syncronizes the item_noequip_db bitmasks with with skill_nocast_db.
- Updates mapflags, and both skills and items which are restricted.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14961 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 5 | ||||
-rw-r--r-- | conf/mapflag/reset.txt | 42 | ||||
-rw-r--r-- | conf/mapflag/restricted.txt | 41 | ||||
-rw-r--r-- | db/item_db.txt | 6 | ||||
-rw-r--r-- | db/item_noequip.txt | 59 | ||||
-rw-r--r-- | db/skill_nocast_db.txt | 36 | ||||
-rw-r--r-- | npc/scripts_mapflags.conf | 1 | ||||
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/npc.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 33 | ||||
-rw-r--r-- | src/map/script.c | 6 | ||||
-rw-r--r-- | src/map/status.c | 10 |
13 files changed, 197 insertions, 47 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index fd22c0ec5..471500cb3 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,11 @@ Date Added 2011/09/18 + * 14961 Applied map flag update patch provided by Daegaladh. Will mess with custom restricted items. + - Adds a reset mapflag which is checked when using the Neuralizer. + - Syncronizes the item_noequip_db bitmasks with with skill_nocast_db. + - Updates mapflags, and both skills and items which are restricted. +2011/09/18 * Fixed CR_SLIMPITCHER passing item requirement index to itemdb_search when used by a monster (bugreport:5021, since r6791). [Ai4rei] 2011/09/17 * Rental items no longer expire in cart and storage. The packet does not support this and rentals cannot be put in on official either (since r14082, related r14083). [Ai4rei] diff --git a/conf/mapflag/reset.txt b/conf/mapflag/reset.txt new file mode 100644 index 000000000..b6693eaf2 --- /dev/null +++ b/conf/mapflag/reset.txt @@ -0,0 +1,42 @@ +//===== eAthena Script =======================================
+//= Map flags that enable the use of Neuralizer
+//===== By: ==================================================
+//= Daegaladh
+//===== Current Version: =====================================
+//= 1.0 [Daegaladh]
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//=
+//============================================================
+
+alberta mapflag reset
+aldebaran mapflag reset
+amatsu mapflag reset
+ayothaya mapflag reset
+brasilis mapflag reset
+comodo mapflag reset
+einbroch mapflag reset
+einbech mapflag reset
+geffen mapflag reset
+gonryun mapflag reset
+izlude mapflag reset
+jawaii mapflag reset
+hugel mapflag reset
+lighthalzen mapflag reset
+louyang mapflag reset
+manuk mapflag reset
+mid_camp mapflag reset
+moc_ruins mapflag reset
+morocc mapflag reset
+moscovia mapflag reset
+niflheim mapflag reset
+prontera mapflag reset
+payon mapflag reset
+pay_arche mapflag reset
+rachel mapflag reset
+splendide mapflag reset
+umbala mapflag reset
+veins mapflag reset
+xmas mapflag reset
+yuno mapflag reset
diff --git a/conf/mapflag/restricted.txt b/conf/mapflag/restricted.txt index 6de962dff..908ea4476 100644 --- a/conf/mapflag/restricted.txt +++ b/conf/mapflag/restricted.txt @@ -6,6 +6,7 @@ //= 1.0 [Komurka] //= 1.1 Added WoE:SE Map restrictions. [L0ne_W0lf] //= 1.2 Added Endless Tower Restrictions. (bugreport:4707) [L0ne_W0lf] +//= 1.3 Added Orc's Memory, Nidhoggur's Nest and towns restrictions [Daegaladh] //===== Current Version: ===================================== //Aldebaran Turbo Track @@ -54,3 +55,43 @@ arug_cas05 mapflag restricted 4 4@tower mapflag restricted 6 5@tower mapflag restricted 6 6@tower mapflag restricted 6 + +//Orc's Memory =================== +1@orcs mapflag restricted 6 +2@orcs mapflag restricted 6 + +// Nidhoggr's Instance =========== +1@nyd mapflag restricted 6 +2@nyd mapflag restricted 6 + +//Towns +alberta mapflag restricted 7 +aldebaran mapflag restricted 7 +amatsu mapflag restricted 7 +ayothaya mapflag restricted 7 +brasilis mapflag restricted 7 +comodo mapflag restricted 7 +einbroch mapflag restricted 7 +einbech mapflag restricted 7 +geffen mapflag restricted 7 +gonryun mapflag restricted 7 +izlude mapflag restricted 7 +jawaii mapflag restricted 7 +hugel mapflag restricted 7 +lighthalzen mapflag restricted 7 +louyang mapflag restricted 7 +manuk mapflag restricted 7 +mid_camp mapflag restricted 7 +moc_ruins mapflag restricted 7 +morocc mapflag restricted 7 +moscovia mapflag restricted 7 +niflheim mapflag restricted 7 +prontera mapflag restricted 7 +payon mapflag restricted 7 +pay_arche mapflag restricted 7 +rachel mapflag restricted 7 +splendide mapflag restricted 7 +umbala mapflag restricted 7 +veins mapflag restricted 7 +xmas mapflag restricted 7 +yuno mapflag restricted 7 diff --git a/db/item_db.txt b/db/item_db.txt index 145b9295c..66e8edc3b 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -5037,7 +5037,7 @@ 12330,Recall_FemaleGM,Summon Female GameMaster Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 2001,1800000; },{},{} 12331,Ginseng,Ginseng,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 6,0; },{},{} 12332,Fruit_Juice,Fruit Juice,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,6; },{},{} -12333,Ansila,Ancilla,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +12333,Ansila,Ancilla,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,15; },{},{} 12334,Cherish_Box,Treasure Edition Helm Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_Cherish_Box),1; },{},{} 12335,Yummy_Skewered_Dish,Grilled Delicious Skewer,0,1000,,350,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 60,60; },{},{} 12336,Baked_Mushroom,Grilled Mushroom,0,500,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 30,30; },{},{} @@ -5099,13 +5099,13 @@ 12392,RepairA,Repair A,2,220,,100,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12393,RepairB,Repair B,2,500,,140,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12394,RepairC,Repair C,2,1100,,180,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12395,Tantanmen,Tantan Noodle,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +12395,Tantanmen,Tantan Noodle,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 1519; },{},{} 12396,Fools_Day_Box,Gift Box?,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1,10)==1) itemskill "AL_TELEPORT",1; else if(rand(1,10)==2) itemskill "AL_TELEPORT",3; else if(rand(1,10)==3) percentheal 50,0; else if(rand(1,10)==4) percentheal 0,50; else if(rand(1,10)==5) end; else if(rand(1,10)==6) getitem 512,1; else if(rand(1,10)==7) itemskill "ALL_REVERSEORCISH",1; else if(rand(1,10)==8) specialeffect2 247; else if(rand(1,10)==9) specialeffect2 338; else specialeffect2 10; },{},{} 12397,Fools_Day_Box2,Gift Box?,11,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1,10)==1) itemskill "TF_DETOXIFY",1; else if(rand(1,10)==2) itemskill "TF_PICKSTONE",1; else if(rand(1,10)==3) itemskill "BA_FROSTJOKER",1; else if(rand(1,10)==4) itemskill "DC_SCREAM",1; else if(rand(1,10)==5) end; else if(rand(1,10)==6) getitem 909,1; else if(rand(1,10)==7) itemskill "AL_RUWACH",1; else if(rand(1,10)==8) specialeffect2 328; else if(rand(1,10)==9) specialeffect2 68; else specialeffect2 196; },{},{} 12398,PCBang_Gift_Box,PCBang Gift Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12399,Castle_Treasure_Box,Castle Treasure Box,2,20,,1000,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12400,Water_Of_Blessing_,Water Of Blessing ,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} -12401,Rune_Kn_Test_Int,Rune Kn Test Int,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} +12401,Rune_Kn_Test_Int,Rune Kn Test Int,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,300000,40; },{},{} 12402,29Fruit,29Fruit,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12403,Lucky_Egg2,Lucky Egg2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12404,Acti_Potion,Acti Potion,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/db/item_noequip.txt b/db/item_noequip.txt index e73c7089d..7fea36294 100644 --- a/db/item_noequip.txt +++ b/db/item_noequip.txt @@ -2,17 +2,18 @@ // here you define which items may not be used at PvP / GvG // format: <item id>,<mode> // mode -// 1- restricted in PVP -// 2- restricted in GVG -// 3- restricted in both PvP and GvG +// 1- restricted in normal maps +// 2- restricted in PVP +// 4- restricted in GVG +// 8- restricted in Battlegrounds // Restricted zones - they're configured by 'restricted <number>' mapflag -// 4 - restricted in zone 1 -// 8 - restricted in zone 2 -// 16 - restricted in zone 3 -// 32 - restricted in zone 4 -// 64 - restricted in zone 5 -// 128 - restricted in zone 6 -// 256 - restricted in zone 7 +// 32 - restricted in zone 1 +// 64 - restricted in zone 2 +// 128 - restricted in zone 3 +// 256 - restricted in zone 4 +// 512 - restricted in zone 5 +// 1024 - restricted in zone 6 +// 2048 - restricted in zone 7 //Examples: //1201,1 you can't use KNIFE(ID 1201) on PvP and GvG @@ -24,20 +25,36 @@ // you can even mix modes //519,41 (32+8+1) you can't use Milk on PVP, and maps marked as 'restricted zone 2' and 'restricted zone 4' +//PVP +14529,2 //Greed Scroll + +//GVG +12218,4 //LV5 Assumptio Scroll +14529,4 //Greed Scroll +14590,4 //Party Assumptio 5 Scroll + +//BATTLEGROUND +12218,8 //LV5 Assumptio Scroll +14590,8 //Party Assumptio 5 Scroll + //Zone 1 - Aldebaran Turbo Track -601,4 //Fly Wing -506,4 //Green Potion -525,4 //Panacea +601,32 //Fly Wing +605,32 //Anodyne +506,32 //Green Potion +525,32 //Panacea //Zone 2 - Jail -601,8 //Fly Wing - not really needed here but ... -602,8 //Butterfly Wing - also not needed -12212,8 //Giant Fly Wing -14582,8 -14583,8 -14584,8 -14585,8 +601,64 //Fly Wing - not really needed here but ... +602,64 //Butterfly Wing - also not needed +12212,64 //Giant Fly Wing +14582,64 +14583,64 +14584,64 +14585,64 //Zone 3 - Izlude Battle Arena -601,16 //Fly Wing +601,128 //Fly Wing + +//Zone 7 - Towns +14529,2048 //Greed Scroll diff --git a/db/skill_nocast_db.txt b/db/skill_nocast_db.txt index 47ec1226b..76c598fd7 100644 --- a/db/skill_nocast_db.txt +++ b/db/skill_nocast_db.txt @@ -21,29 +21,39 @@ // Example: // 8,6 = Endure cannot be used in PvP and GvG maps (2+4) +//PVP +1013,2048 //BS_GREED + //GVG 26,4 //AL_TELEPORT 27,4 //AL_WARP 87,4 //WZ_ICEWALL 150,4 //TF_BACKSLIDING -290,4 //SA_ABRACADABRA +219,4 //RG_INTIMIDATE +336,4 //WE_CALLPARTNER 361,4 //HP_ASSUMPTIO 362,4 //HP_BASILICA 395,4 //CG_MOONLIT +409,4 //WE_CALLPARENT +410,4 //WE_CALLBABY 491,4 //CR_CULTIVATION 530,4 //NJ_KIRIKAGE 691,4 //CASH_ASSUMPTIO +1013,2048 //BS_GREED //BATTLEGROUND 26,8 //AL_TELEPORT 27,8 //AL_WARP 87,8 //WZ_ICEWALL 150,8 //TF_BACKSLIDING +219,8 //RG_INTIMIDATE 264,8 //MO_BODYRELOCATION +336,8 //WE_CALLPARTNER 361,8 //HP_ASSUMPTIO 362,8 //HP_BASILICA 395,8 //CG_MOONLIT -396,8 //CG_MARIONETTE +409,8 //WE_CALLPARENT +410,8 //WE_CALLBABY 491,8 //CR_CULTIVATION 411,8 //TK_RUN 426,8 //TK_HIGHJUMP @@ -72,19 +82,20 @@ 79,16 //PR_MAGNUS //Zone 1 - Aldebaran Turbo Track -219,32 //RG_INTIMIDATE +8,32 //SM_ENDURE 26,32 //AL_TELEPORT 27,32 //AL_WARP -51,32 //TF_HIDING -135,32 //AS_CLOAKING -389,32 //ST_CHASEWALK 35,32 //AL_CURE +51,32 //TF_HIDING 87,32 //WZ_ICEWALL +135,32 //AS_CLOAKING +219,32 //RG_INTIMIDATE +264,32 //MO_BODYRELOCATION +357,32 //LK_CONCENTRATION 359,32 //LK_BERSERK 362,32 //HP_BASILICA +389,32 //ST_CHASEWALK 395,32 //CG_MOONLIT -357,32 //LK_CONCENTRATION -264,32 //MO_BODYRELOCATION //Zone 2 - Jail 421,64 //TK_JUMPKICK @@ -96,6 +107,7 @@ //Zone 4 - WoE:SE 426,256 //TK_HIGHJUMP +290,256 //SA_ABRACADABRA //Zone 5 - Sealed Shrine 12,512 //MG_SAFETYWALL @@ -104,9 +116,15 @@ 361,512 //HP_ASSUMPTIO 691,512 //CASH_ASSUMPTIO -//Zone 6 -Endless Tower +//Zone 6 - Endless Tower, Orc's Memory, Nidhoggur's Nest 26,1024 //AL_TELEPORT 87,1024 //WZ_ICEWALL 219,1024 //RG_INTIMIDATE 405,1024 //PF_SPIDERWEB 674,1024 //NPC_EXPULSION + +//Zone 7 - Towns +232,2048 //AM_CANNIBALIZE +233,2048 //AM_SPHEREMINE +491,2048 //CR_CULTIVATION +1013,2048 //BS_GREED diff --git a/npc/scripts_mapflags.conf b/npc/scripts_mapflags.conf index 93587fe08..485d404cd 100644 --- a/npc/scripts_mapflags.conf +++ b/npc/scripts_mapflags.conf @@ -27,4 +27,5 @@ npc: conf/mapflag/battleground.txt npc: conf/mapflag/fireworks.txt npc: conf/mapflag/novending.txt npc: conf/mapflag/town.txt +npc: conf/mapflag/reset.txt // -------------------------------------------------------------- diff --git a/src/map/atcommand.c b/src/map/atcommand.c index c2599d68d..e98481f22 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4416,6 +4416,8 @@ ACMD_FUNC(mapinfo) strcat(atcmd_output, "NoIcewall | "); if (map[m_id].flag.allowks) strcat(atcmd_output, "AllowKS | "); + if (map[m_id].flag.reset) + strcat(atcmd_output, "Reset | "); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output,"Other Flags: "); diff --git a/src/map/map.h b/src/map/map.h index cd2ea9411..6af6efb2c 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -491,6 +491,7 @@ struct map_data { unsigned partylock :1; unsigned guildlock :1; unsigned src4instance : 1; // To flag this map when it's used as a src map for instances + unsigned reset :1; // [Daegaladh] } flag; struct point save; struct npc_data *npc[MAX_NPC_PER_MAP]; diff --git a/src/map/npc.c b/src/map/npc.c index ceb1f3f1d..897475f73 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3117,6 +3117,8 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con map[m].flag.partylock=state; else if (!strcmpi(w3,"guildlock")) map[m].flag.guildlock=state; + else if (!strcmpi(w3,"reset")) + map[m].flag.reset=state; else ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); diff --git a/src/map/pc.c b/src/map/pc.c index 23605409a..b93334f35 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -720,13 +720,17 @@ int pc_isequip(struct map_session_data *sd,int n) return 0; if(item->sex != 2 && sd->status.sex != item->sex) return 0; - if(map[sd->bl.m].flag.pvp && ((item->flag.no_equip&1) || !pc_isAllowedCardOn(sd,item->slot,n,1))) + if(!map_flag_vs(sd->bl.m) && ((item->flag.no_equip&1) || !pc_isAllowedCardOn(sd,item->slot,n,1))) + return 0; + if(map[sd->bl.m].flag.pvp && ((item->flag.no_equip&2) || !pc_isAllowedCardOn(sd,item->slot,n,2))) + return 0; + if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&4) || !pc_isAllowedCardOn(sd,item->slot,n,4))) + return 0; + if(map[sd->bl.m].flag.battleground && ((item->flag.no_equip&8) || !pc_isAllowedCardOn(sd,item->slot,n,8))) return 0; - if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&2) || !pc_isAllowedCardOn(sd,item->slot,n,2))) - return 0; if(map[sd->bl.m].flag.restricted) { - int flag =map[sd->bl.m].zone; + int flag =8*map[sd->bl.m].zone; if (item->flag.no_equip&flag || !pc_isAllowedCardOn(sd,item->slot,n,flag)) return 0; } @@ -3648,6 +3652,11 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( nameid == 12243 && sd->md->db->lv < 80 ) return 0; break; + + case 12213: //Neuralizer + if( !map[sd->bl.m].flag.reset ) + return 0; + break; } if( nameid >= 12153 && nameid <= 12182 && sd->md != NULL ) @@ -3655,9 +3664,11 @@ int pc_isUseitem(struct map_session_data *sd,int n) //added item_noequip.txt items check by Maya&[Lupus] if ( - (map[sd->bl.m].flag.pvp && item->flag.no_equip&1) || // PVP - (map_flag_gvg(sd->bl.m) && item->flag.no_equip&2) || // GVG - (map[sd->bl.m].flag.restricted && item->flag.no_equip&map[sd->bl.m].zone) // Zone restriction + (!map_flag_vs(sd->bl.m) && item->flag.no_equip&1) || // Normal + (map[sd->bl.m].flag.pvp && item->flag.no_equip&2) || // PVP + (map_flag_gvg(sd->bl.m) && item->flag.no_equip&4) || // GVG + (map[sd->bl.m].flag.battleground && item->flag.no_equip&8) || // Battleground + (map[sd->bl.m].flag.restricted && item->flag.no_equip&(8*map[sd->bl.m].zone)) // Zone restriction ) return 0; @@ -7435,9 +7446,11 @@ int pc_checkitem(struct map_session_data *sd) if( it ) { // check for forbiden items. int flag = - (map[sd->bl.m].flag.restricted?map[sd->bl.m].zone:0) - | (map[sd->bl.m].flag.pvp?1:0) - | (map_flag_gvg(sd->bl.m)?2:0); + (map[sd->bl.m].flag.restricted?(8*map[sd->bl.m].zone):0) + | (!map_flag_vs(sd->bl.m)?1:0) + | (map[sd->bl.m].flag.pvp?2:0) + | (map_flag_gvg(sd->bl.m)?4:0) + | (map[sd->bl.m].flag.battleground?8:0); if( flag && (it->flag.no_equip&flag || !pc_isAllowedCardOn(sd,it->slot,i,flag)) ) { pc_unequipitem(sd, i, 2); diff --git a/src/map/script.c b/src/map/script.c index 0da5e21aa..6a5243f74 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -348,7 +348,8 @@ enum { MF_ALLOWKS, MF_MONSTER_NOTELEPORT, MF_PVP_NOCALCRANK, //50 - MF_BATTLEGROUND + MF_BATTLEGROUND, + MF_RESET }; const char* script_op2name(int op) @@ -9632,6 +9633,7 @@ BUILDIN_FUNC(getmapflag) 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; } } @@ -9701,6 +9703,7 @@ BUILDIN_FUNC(setmapflag) 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; } } @@ -9767,6 +9770,7 @@ BUILDIN_FUNC(removemapflag) 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; } } diff --git a/src/map/status.c b/src/map/status.c index 89ad5c483..3ec822a6a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1992,11 +1992,15 @@ int status_calc_pc_(struct map_session_data* sd, bool first) if(!data->script) continue; if(data->flag.no_equip) { //Card restriction checks. - if(map[sd->bl.m].flag.restricted && data->flag.no_equip&map[sd->bl.m].zone) + if(map[sd->bl.m].flag.restricted && data->flag.no_equip&(8*map[sd->bl.m].zone)) continue; - if(map[sd->bl.m].flag.pvp && data->flag.no_equip&1) + if(!map_flag_vs(sd->bl.m) && data->flag.no_equip&1) continue; - if(map_flag_gvg(sd->bl.m) && data->flag.no_equip&2) + if(map[sd->bl.m].flag.pvp && data->flag.no_equip&2) + continue; + if(map_flag_gvg(sd->bl.m) && data->flag.no_equip&4) + continue; + if(map[sd->bl.m].flag.battleground && data->flag.no_equip&8) continue; } if(i == EQI_HAND_L && sd->status.inventory[index].equip == EQP_HAND_L) |