Jump to content
Sign in to follow this  
kyeme

No Bank Mapflag

Recommended Posts

~ up ~

 

http://herc.ws/board/topic/3100-nobanking-mapflag/?hl=bank

 

 

Index: conf/messages.conf===================================================================--- conf/messages.conf	(revision 13307)+++ conf/messages.conf	(working copy)@@ -1560,6 +1560,8 @@ 1496: Item types on your autoloottype list: 1497: Your autoloottype list has been reset. +//Banking mapflag+1498: Banking is disabled in this map  //Custom translations import: conf/import/msg_conf.txtIndex: db/const.txt===================================================================--- db/const.txt	(revision 13307)+++ db/const.txt	(working copy)@@ -367,6 +367,7 @@ mf_reset	52 mf_notomb	53 mf_nocashshop	54+mf_nobanking 55  cell_walkable	0 cell_shootable	1Index: db/pre-re/map_zone_db.conf===================================================================--- db/pre-re/map_zone_db.conf	(revision 13307)+++ db/pre-re/map_zone_db.conf	(working copy)@@ -92,6 +92,7 @@ 	 	mapflags: ( 		"nocashshop",+		"nobanking", 	) 	 },@@ -168,6 +169,7 @@ 		"long_damage_rate	80", 		"short_damage_rate	80", 		"nocashshop",+		"nobanking", 	) 	 },Index: db/re/map_zone_db.conf===================================================================--- db/re/map_zone_db.conf	(revision 13307)+++ db/re/map_zone_db.conf	(working copy)@@ -90,9 +90,9 @@ 		Greed_Scroll: true 	} 	-	/* cashshop disabled in pvp maps */ 	mapflags: (-		"nocashshop",+		"nocashshop", //cashshop disabled in pvp maps+		"nobanking", //banking disabled in pvp maps 	) }, {@@ -168,6 +168,7 @@ 		"long_damage_rate	80", 		"short_damage_rate	80", 		"nocashshop",+		"nobanking", 	) 	 },Index: src/map/atcommand.c===================================================================--- src/map/atcommand.c	(revision 13307)+++ src/map/atcommand.c	(working copy)@@ -7475,7 +7475,7 @@ 		CHECKFLAG(nojobexp);          CHECKFLAG(nomobloot);          CHECKFLAG(nomvploot);    CHECKFLAG(nightenabled); 		CHECKFLAG(nodrop);            CHECKFLAG(novending);          CHECKFLAG(loadevent); 		CHECKFLAG(nochat);            CHECKFLAG(partylock);          CHECKFLAG(guildlock);    CHECKFLAG(src4instance);-		CHECKFLAG(notomb);            CHECKFLAG(nocashshop);+		CHECKFLAG(notomb);            CHECKFLAG(nocashshop);         CHECKFLAG(nobanking); 		clif->message(sd->fd," "); 		clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On) 		clif->message(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags.@@ -7512,7 +7512,7 @@ 	SETFLAG(nojobexp);          SETFLAG(nomobloot);          SETFLAG(nomvploot);    SETFLAG(nightenabled); 	SETFLAG(nodrop);            SETFLAG(novending);          SETFLAG(loadevent); 	SETFLAG(nochat);            SETFLAG(partylock);          SETFLAG(guildlock);    SETFLAG(src4instance);-	SETFLAG(notomb);            SETFLAG(nocashshop);+	SETFLAG(notomb);            SETFLAG(nocashshop);         SETFLAG(nobanking); 	 	clif->message(sd->fd,msg_txt(1314)); // Invalid flag name or flag. 	clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)@@ -7524,7 +7524,7 @@ 	clif->message(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,"); 	clif->message(sd->fd,"fog, fireworks, sakura, leaves, nobaseexp, nojobexp, nomobloot,"); 	clif->message(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,");-	clif->message(sd->fd,"guildlock, src4instance, notomb, nocashshop");+	clif->message(sd->fd,"guildlock, src4instance, notomb, nocashshop, nobanking"); 	 #undef CHECKFLAG #undef SETFLAGIndex: src/map/clif.c===================================================================--- src/map/clif.c	(revision 13307)+++ src/map/clif.c	(working copy)@@ -17881,7 +17881,12 @@ 		clif->colormes(fd,COLOR_RED,msg_txt(1483)); 		return; 	}-	++	if( map->list[sd->bl.m].flag.nobanking ) {+		clif->colormes(fd,COLOR_RED,msg_txt(1498)); //Banking is disabled in this map+		return;+	}+ 	money = (int)cap_value(p->Money,0,INT_MAX);  	pc->bank_deposit(sd,money);@@ -17896,6 +17901,12 @@ 		return; 	} 	++	if( map->list[sd->bl.m].flag.nobanking ) {+		clif->colormes(fd,COLOR_RED,msg_txt(1498)); //Banking is disabled in this map+		return;+	}+	 	money = (int)cap_value(p->Money,0,INT_MAX); 	 	pc->bank_withdraw(sd,money);@@ -17908,7 +17919,12 @@ 		clif->colormes(fd,COLOR_RED,msg_txt(1483)); 		return; 	}-	++	if( map->list[sd->bl.m].flag.nobanking ) {+		clif->colormes(fd,COLOR_RED,msg_txt(1498)); //Banking is disabled in this map+		return;+	}+ 	p.PacketType = banking_checkType; 	p.Money = (int)sd->status.bank_vault; 	p.Reason = (short)0;Index: src/map/map.c===================================================================--- src/map/map.c	(revision 13307)+++ src/map/map.c	(working copy)@@ -4404,6 +4404,15 @@ 			else if( map->list[m].flag.nocashshop ) 				map_zone_mf_cache_add(m,"nocashshop"); 		}+	} else if (!strcmpi(flag,"nobanking")) {+		if( state && map->list[m].flag.nobanking )+			;/* nothing to do */+		else {+			if( state )+				map_zone_mf_cache_add(m,"nobankingtoff");+			else if( map->list[m].flag.nobanking )+				map_zone_mf_cache_add(m,"nobanking");+		} 	}  	return false;Index: src/map/map.h===================================================================--- src/map/map.h	(revision 13307)+++ src/map/map.h	(working copy)@@ -647,6 +647,7 @@ 		unsigned noknockback : 1; 		unsigned notomb : 1; 		unsigned nocashshop : 1;+		unsigned nobanking : 1; 	} flag; 	struct point save; 	struct npc_data *npc[MAX_NPC_PER_MAP];Index: src/map/npc.c===================================================================--- src/map/npc.c	(revision 13307)+++ src/map/npc.c	(working copy)@@ -3504,6 +3504,8 @@ 		map->list[m].flag.src4instance = (state) ? 1 : 0; 	} else if ( !strcmpi(w3,"nocashshop") ) { 		map->list[m].flag.nocashshop = (state) ? 1 : 0;+	} else if ( !strcmpi(w3,"nobanking") ) {+		map->list[m].flag.nobanking = (state) ? 1 : 0; 	} else 		ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.n", w3, filepath, strline(buffer,start-buffer)); Index: src/map/script.c===================================================================--- src/map/script.c	(revision 13307)+++ src/map/script.c	(working copy)@@ -10472,6 +10472,7 @@ 			case MF_RESET:              script_pushint(st,map->list[m].flag.reset); break; 			case MF_NOTOMB:             script_pushint(st,map->list[m].flag.notomb); break; 			case MF_NOCASHSHOP:         script_pushint(st,map->list[m].flag.nocashshop); break;+			case MF_NOBANKING:         script_pushint(st,map->list[m].flag.nobanking); break; 		} 	} 	@@ -10589,6 +10590,7 @@ 			case MF_RESET:              map->list[m].flag.reset = 1; break; 			case MF_NOTOMB:             map->list[m].flag.notomb = 1; break; 			case MF_NOCASHSHOP:         map->list[m].flag.nocashshop = 1; break;+			case MF_NOBANKING:         map->list[m].flag.nobanking = 1; break; 		} 	} 	@@ -10675,6 +10677,7 @@ 			case MF_RESET:              map->list[m].flag.reset = 0; break; 			case MF_NOTOMB:             map->list[m].flag.notomb = 0; break; 			case MF_NOCASHSHOP:         map->list[m].flag.nocashshop = 0; break;+			case MF_NOBANKING:         map->list[m].flag.nobanking = 0; break; 		} 	} 	Index: src/map/script.h===================================================================--- src/map/script.h	(revision 13307)+++ src/map/script.h	(working copy)@@ -297,7 +297,8 @@ 	MF_BATTLEGROUND, 	MF_RESET, 	MF_NOTOMB,-	MF_NOCASHSHOP+	MF_NOCASHSHOP,+	MF_NOBANKING };  /**

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.