Explorar o código

Merge branch 'master' of https://github.com/rathena/rathena

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17423 54d463be-8e91-2dee-dedb-b68131a5f0ec
rathenabot %!s(int64=12) %!d(string=hai) anos
pai
achega
1911e0fda4

+ 3 - 1
npc/custom/quests/quest_shop.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: =====================================
-//= 1.6a
+//= 1.6b
 //===== Compatible With: =====================================
 //= rAthena SVN r16862+
 //===== Description: =========================================
@@ -18,6 +18,7 @@
 //= 1.5 Replaced categories with shop IDs.
 //= 1.6 Added support for purchasing stackables.
 //= 1.6a Added support for previewing costumes and robes.
+//= 1.6b Added 'disable_items' command.
 //============================================================
 
 // Shop NPCs -- supplying no argument displays entire menu.
@@ -118,6 +119,7 @@ OnBuyItem:
 	mes "[Quest Shop]";
 	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
 	mes "Requirements:";
+	disable_items;
 	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
 	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
 	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)

+ 14 - 54
npc/jobs/2-1/assassin.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88
 //===== Current Version: ===================================== 
-//= 3.5
+//= 3.6
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -48,6 +48,7 @@
 //= 3.3 Added Quest Log commands. [Kisuka]
 //= 3.4 Removed the need for use of 'goto.' [L0ne_W0lf]
 //= 3.5 Fixed the waitingroom where player can enter the Test Area without passing the written exam. Now player will not be warp inside the Test Area when did not passed the written exam instead the player will be warp back to the written exam entrance [JayPee]
+//= 3.6 Fixed broken event calls. [Euphy]
 //============================================================ 
 
 in_moc_16,19,33,1	script	Guildsman#asn	55,{
@@ -1609,7 +1610,7 @@ OnTouch:
 	else {
 		mapannounce "in_moc_16",strcharinfo(0)+" has entered 'Guildmaster's room.'",bc_map;
 		savepoint "in_moc_16",181,183;
-		donpcevent "Guildmaster#ASN2::OnDisable";
+		donpcevent "Guildmaster#ASN1::OnCast";
 		warp "in_moc_16",167,113;
 		end;
 	}
@@ -1631,7 +1632,7 @@ OnTouch:
 	mes "at the end of maze.";
 	close;
 
-OnDisable:
+OnCast:
 	mapannounce "in_moc_16","...Next volunteer, please come in.",bc_map;
 	end;
 }
@@ -1998,7 +1999,7 @@ OnTouch:
 		mes "'Beholder,' what";
 		mes "is your opinion?";
 		next;
-		donpcevent "[Huey]::OnDisable";
+		disablenpc "[Huey]";
 		mes "[Beholder]";
 		mes "Well, I don't like the course score. But, somehow the whole test was passed. I'm okay with this person.";
 		next;
@@ -2242,58 +2243,17 @@ OnTouch:
 	close;
 }
 
-in_moc_16,156,87,1	script	[Huey]	55,{
-	end;
-
-OnInit:
-	disablenpc "[Huey]";
-	end;
-}
-
-in_moc_16,156,85,1	script	[Khai]	730,{
-	end;
-
-OnInit:
-	disablenpc "[Khai]";
-	end;
-}
-
-in_moc_16,156,83,1	script	[The Anonymous One]	106,{
-	end;
-
-OnInit:
-	disablenpc "[The Anonymous One]";
-	end;
-}
-
-in_moc_16,156,81,2	script	[Barcardi]	725,{
-	end;
-
-OnInit:
-	disablenpc "[Barcardi]";
-	end;
-}
-
-in_moc_16,156,79,1	script	[Beholder]	118,{
-	end;
-
-OnInit:
-	disablenpc "[Beholder]";
-	end;
-}
-
-in_moc_16,156,77,1	script	[Thomas]	118,{
-	end;
-
-OnInit:
-	disablenpc "[Thomas]";
-	end;
-}
-
-in_moc_16,156,75,1	script	[Gayle Maroubitz]	55,{
+-	script	#moc_assin_dup	-1,{
 	end;
 
 OnInit:
-	disablenpc "[Gayle Maroubitz]";
+	disablenpc strnpcinfo(0);
 	end;
 }
+in_moc_16,156,87,1	duplicate(#moc_assin_dup)	[Huey]	55
+in_moc_16,156,85,1	duplicate(#moc_assin_dup)	[Khai]	730
+in_moc_16,156,83,1	duplicate(#moc_assin_dup)	[The Anonymous One]	106
+in_moc_16,156,81,2	duplicate(#moc_assin_dup)	[Barcardi]	725
+in_moc_16,156,79,1	duplicate(#moc_assin_dup)	[Beholder]	118
+in_moc_16,156,77,1	duplicate(#moc_assin_dup)	[Thomas]	118
+in_moc_16,156,75,1	duplicate(#moc_assin_dup)	[Gayle Maroubitz]	55

+ 0 - 1
npc/pre-re/jobs/novice/novice.txt

@@ -924,7 +924,6 @@ new_1-2,115,111,3	script	Item Tutor#nv	726,{
 		}
 	}
 	else if (nov_get_item04 < 10) {
-		enable_items;
 		mes "[Alice]";
 		mes "^666666*Yawn~*^000000";
 		mes "This is so boring.";

+ 1 - 0
npc/re/quests/quests_malangdo.txt

@@ -10683,6 +10683,7 @@ mal_in01,15,16,3	script	Fallen Angel#mal	403,{
 		}
 		set .@equip_refine, getequiprefinerycnt(EQI_GARMENT);
 		setarray .@equip_card[0], getequipcardid(EQI_GARMENT,0),getequipcardid(EQI_GARMENT,1),getequipcardid(EQI_GARMENT,2);
+		delitem 6417,3; //Silvervine
 		delequip EQI_GARMENT;
 		getitem2 2573,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],0; //Archangel_Wing
 		mes "[Fallen Angel]";

+ 7 - 4
src/map/clif.c

@@ -10210,7 +10210,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd){
 		if (pc_isdead(sd))
 			break;
 
-		if (pc_cant_act2(sd))
+		if (pc_cant_act2(sd) || sd->npc_id)
 			break;
 
 		if (sd->sc.count && (
@@ -10348,7 +10348,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
 		return;
 	}
 
-	if (pc_cant_act2(sd))
+	if (pc_cant_act2(sd) || sd->npc_id)
 		return;
 
 	bl = map_id2bl(RFIFOL(fd,info->pos[0]));
@@ -10889,11 +10889,14 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
 	if( sd->npc_id ){
 #ifdef RENEWAL
 		clif_msg(sd, USAGE_FAIL); // TODO look for the client date that has this message.
-#endif
 		return;
+#else
+		if( !sd->npc_item_flag || !(tmp&INF_SELF_SKILL) )
+			return;
+#endif
 	}
 
-	if( pc_cant_act(sd) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
+	if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
 		return;
 	if( pc_issit(sd) )
 		return;

+ 4 - 1
src/map/pc.c

@@ -4299,8 +4299,11 @@ int pc_useitem(struct map_session_data *sd,int n)
 	if( sd->npc_id ){
 #ifdef RENEWAL
 		clif_msg(sd, USAGE_FAIL); // TODO look for the client date that has this message.
-#endif
 		return 0;
+#else
+		if( !sd->npc_item_flag )
+			return 0;
+#endif
 	}
 
 	if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 )

+ 2 - 2
src/map/pc.h

@@ -640,8 +640,8 @@ struct {
 #define pc_istrading(sd)      ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
 #define pc_cant_act(sd)       ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
 
-/* equals pc_cant_act except it doesn't check for chat rooms */
-#define pc_cant_act2(sd)       ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
+/* equals pc_cant_act except it doesn't check for chat rooms or npcs */
+#define pc_cant_act2(sd)       ( (sd)->state.vending || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
 
 #define pc_setdir(sd,b,h)     ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
 #define pc_setchatid(sd,n)    ( (sd)->chatID = n )