Revert countitem2 back to original check method - Fixes bugreport:7695
Update unit_teleport_timer to enforce tid check (lighta) - Attempted fix for bugreport:7696 Fixed small bugs in Mora Enchants script. (follow-up r17344, credits: Lemongrass) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17346 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7db16d51e9
commit
acac72005f
@ -3,7 +3,7 @@
|
|||||||
//===== By: ==================================================
|
//===== By: ==================================================
|
||||||
//= Euphy
|
//= Euphy
|
||||||
//===== Current Version: =====================================
|
//===== Current Version: =====================================
|
||||||
//= 1.1
|
//= 1.1a
|
||||||
//===== Compatible With: =====================================
|
//===== Compatible With: =====================================
|
||||||
//= rAthena SVN
|
//= rAthena SVN
|
||||||
//===== Description: =========================================
|
//===== Description: =========================================
|
||||||
@ -13,6 +13,7 @@
|
|||||||
//===== Additional Comments: =================================
|
//===== Additional Comments: =================================
|
||||||
//= 1.0 First Version. [Euphy]
|
//= 1.0 First Version. [Euphy]
|
||||||
//= 1.1 Optimized. [Euphy]
|
//= 1.1 Optimized. [Euphy]
|
||||||
|
//= 1.1a Bug fixes. [Lemongrass]
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
// Arch Bishop Enchants :: coin_arc
|
// Arch Bishop Enchants :: coin_arc
|
||||||
@ -1478,7 +1479,7 @@ function script F_Mora_Enchant {
|
|||||||
delitem 6380,5; //Mora_Coin
|
delitem 6380,5; //Mora_Coin
|
||||||
delitem getarg(0),1;
|
delitem getarg(0),1;
|
||||||
set .@i, rand(1,4568);
|
set .@i, rand(1,4568);
|
||||||
if (.@i <= 3181) {
|
if (.@i <= 3168) {
|
||||||
// Basic combinations
|
// Basic combinations
|
||||||
// (raw: .@i increments by 11)
|
// (raw: .@i increments by 11)
|
||||||
setarray .@enchant_slot1[0],4766,4767,4764,4765,4762,4763,4760,4761; //Atk2,Atk3,Critical5,Critical7,Evasion6,Evasion12,Matk1,Matk2
|
setarray .@enchant_slot1[0],4766,4767,4764,4765,4762,4763,4760,4761; //Atk2,Atk3,Critical5,Critical7,Evasion6,Evasion12,Matk1,Matk2
|
||||||
@ -1489,6 +1490,8 @@ function script F_Mora_Enchant {
|
|||||||
.@enchant_slot2[rand(getarraysize(.@enchant_slot2))],
|
.@enchant_slot2[rand(getarraysize(.@enchant_slot2))],
|
||||||
.@enchant_slot3[rand(getarraysize(.@enchant_slot3))];
|
.@enchant_slot3[rand(getarraysize(.@enchant_slot3))];
|
||||||
}
|
}
|
||||||
|
else if (.@i <= 3179) setarray .@enchants[1],4761,4720,4700; //Matk2 Dexterity1 Strength1
|
||||||
|
else if (.@i <= 3181) setarray .@enchants[1],4761,4712,4712; //Matk2 Inteligence3 Inteligence3
|
||||||
else if (.@i <= 3183) setarray .@enchants[1],4765,4732,4732; //Critical7 Agility3 Agility3
|
else if (.@i <= 3183) setarray .@enchants[1],4765,4732,4732; //Critical7 Agility3 Agility3
|
||||||
else if (.@i <= 3185) setarray .@enchants[1],4763,4752,4753; //Evasion12 Luck3 Luck4
|
else if (.@i <= 3185) setarray .@enchants[1],4763,4752,4753; //Evasion12 Luck3 Luck4
|
||||||
else if (.@i <= 3187) setarray .@enchants[1],4763,4742,4742; //Evasion12 Vitality3 Vitality3
|
else if (.@i <= 3187) setarray .@enchants[1],4763,4742,4742; //Evasion12 Vitality3 Vitality3
|
||||||
|
@ -6088,22 +6088,25 @@ BUILDIN_FUNC(countitem)
|
|||||||
if(sd->status.inventory[i].nameid == nameid)
|
if(sd->status.inventory[i].nameid == nameid)
|
||||||
count += sd->status.inventory[i].amount;
|
count += sd->status.inventory[i].amount;
|
||||||
} else { // For countitem2() function
|
} else { // For countitem2() function
|
||||||
struct item tmp_it;
|
int nameid, iden, ref, attr, c1, c2, c3, c4;
|
||||||
tmp_it.nameid = id->nameid;
|
|
||||||
tmp_it.identify = script_getnum(st, 3);
|
|
||||||
tmp_it.refine = script_getnum(st, 4);
|
|
||||||
tmp_it.attribute = script_getnum(st, 5);
|
|
||||||
tmp_it.card[0] = (short) script_getnum(st, 6);
|
|
||||||
tmp_it.card[1] = (short) script_getnum(st, 7);
|
|
||||||
tmp_it.card[2] = (short) script_getnum(st, 8);
|
|
||||||
tmp_it.card[3] = (short) script_getnum(st, 9);
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_INVENTORY; i++)
|
nameid = id->nameid;
|
||||||
if ((&sd->status.inventory[i] != NULL)
|
iden = script_getnum(st,3);
|
||||||
&& sd->status.inventory[i].amount > 0
|
ref = script_getnum(st,4);
|
||||||
&& compare_item(&sd->status.inventory[i], &tmp_it)
|
attr = script_getnum(st,5);
|
||||||
)
|
c1 = (short)script_getnum(st,6);
|
||||||
count += sd->status.inventory[i].amount;
|
c2 = (short)script_getnum(st,7);
|
||||||
|
c3 = (short)script_getnum(st,8);
|
||||||
|
c4 = (short)script_getnum(st,9);
|
||||||
|
|
||||||
|
for(i = 0; i < MAX_INVENTORY; i++)
|
||||||
|
if (sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] != NULL &&
|
||||||
|
sd->status.inventory[i].amount > 0 && sd->status.inventory[i].nameid == nameid &&
|
||||||
|
sd->status.inventory[i].identify == iden && sd->status.inventory[i].refine == ref &&
|
||||||
|
sd->status.inventory[i].attribute == attr && sd->status.inventory[i].card[0] == c1 &&
|
||||||
|
sd->status.inventory[i].card[1] == c2 && sd->status.inventory[i].card[2] == c3 &&
|
||||||
|
sd->status.inventory[i].card[3] == c4 )
|
||||||
|
count += sd->status.inventory[i].amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
script_pushint(st,count);
|
script_pushint(st,count);
|
||||||
|
@ -137,13 +137,15 @@ int* unit_get_masterteleport_timer(struct block_list *bl){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int unit_teleport_timer(int tid, unsigned int tick, int id, intptr_t data){
|
int unit_teleport_timer(int tid, unsigned int tick, int id, intptr_t data){
|
||||||
|
struct block_list *bl = map_id2bl(id);
|
||||||
|
int *mast_tid = unit_get_masterteleport_timer(bl);
|
||||||
|
|
||||||
if(tid == INVALID_TIMER)
|
if(tid == INVALID_TIMER)
|
||||||
return 0;
|
return 0;
|
||||||
|
else if(*mast_tid && *mast_tid != tid)
|
||||||
|
return 0;
|
||||||
else {
|
else {
|
||||||
struct block_list *bl = map_id2bl(id);
|
|
||||||
int *mast_tid = unit_get_masterteleport_timer(bl);
|
|
||||||
TBL_PC *msd = unit_get_master(bl);
|
TBL_PC *msd = unit_get_master(bl);
|
||||||
|
|
||||||
switch(data){
|
switch(data){
|
||||||
case BL_HOM:
|
case BL_HOM:
|
||||||
case BL_ELEM:
|
case BL_ELEM:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user