Merge branch 'Upstream/master'
This commit is contained in:
commit
5c7e1fa683
@ -139,7 +139,7 @@ motd_type: 0
|
||||
display_version: yes
|
||||
|
||||
// When affected with the "Hallucination" status effect, send the effect to client? (Note 1)
|
||||
// Note: Set to 'no' if the client lags due to the "Wavy" screen effect.
|
||||
// NOTE: Set to 'no' if the client lags due to the "Wavy" screen effect.
|
||||
display_hallucination: yes
|
||||
|
||||
// Set this to 1 if your client supports status change timers and you want to use them
|
||||
@ -158,6 +158,11 @@ client_sort_storage: no
|
||||
// Do we allow to change guilde emblem during woe_time?
|
||||
emblem_woe_change: yes
|
||||
|
||||
// How many transparent pixel can be found in emblem before detected as invalid ?
|
||||
// Note 2
|
||||
// How many transparent pixel can be found in emblem before detected as invalid? (Note 2)
|
||||
emblem_transparency_limit: 80
|
||||
|
||||
// Update enemy position while in invisible state? (Note 1)
|
||||
// NOTE: Set to 'no' will make client won't update enemy position unless the players have "Intravision" effect.
|
||||
// So that will help client handling WPE - Maya Purple Hack stuff.
|
||||
// But it will screw 'the game animation display' while players in invisible state.
|
||||
update_enemy_position: yes
|
||||
|
@ -308,7 +308,7 @@
|
||||
199,9,6,1,7,0x40,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_BLOODDRAIN,Sucking Blood
|
||||
200,9,6,1,7,0,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_ENERGYDRAIN,Energy Drain
|
||||
201,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_KEEPING,Keeping
|
||||
202,9,6,1,7,0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath
|
||||
202,9,6,1,7,0xC0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath
|
||||
203,9,6,1,7,0x1,0,10,1,no,0,0x2,0,magic,0,0x0, NPC_DARKBLESSING,Dark Blessing
|
||||
204,0,0,4,0,0x1,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_BARRIER,Barrier
|
||||
205,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_DEFENDER,Defender
|
||||
|
@ -8529,9 +8529,9 @@
|
||||
18737,Fortier_Mask,Fortier Masque,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,10,0,876,{ bonus bUnbreakableHelm,0; },{},{}
|
||||
18739,Carnation_Hairband,Carnation Hairband,5,20,,100,,0,,0,0xFFFFFFFF,63,2,256,,0,1,878,{ bonus bLuk,1; },{},{}
|
||||
18740,Hair_Of_The_Strong,Hair Of The Strong,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,879,{},{},{}
|
||||
18742,C_MoonStar_Accessory,Moon and Stars,5,20,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,881,{},{ sc_start SC_MOONSTAR,-1,0; },{ sc_end SC_MOONSTAR; }
|
||||
18742,C_MoonStar_Accessory,Moon and Stars,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,881,{},{ sc_start SC_MOONSTAR,-1,0; },{ sc_end SC_MOONSTAR; }
|
||||
18743,Spirit_Of_Chung_E,Spirit Of Chung E,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,882,{},{},{}
|
||||
18744,C_World_Star,Twilight,5,20,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,883,{},{ sc_start SC_SUPER_STAR,-1,0; },{ sc_end SC_SUPER_STAR; }
|
||||
18744,C_World_Star,Twilight,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,883,{},{ sc_start SC_SUPER_STAR,-1,0; },{ sc_end SC_SUPER_STAR; }
|
||||
18745,Choco_Stick_In_Mouth,Choco Stick In Mouth,5,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,884,{},{},{}
|
||||
18746,Chilly_Breath,Chilly Breath,5,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,885,{ bonus bInt,1; },{},{}
|
||||
18747,Eyes_Of_Ifrit,Eyes Of Ifrit,5,20,,100,,1,,1,0xFFFFFFFF,63,2,512,,0,0,886,{ bonus bDex,1; },{},{}
|
||||
@ -8544,7 +8544,7 @@
|
||||
18758,Hat_Of_Scrat,Hat Of Scrat,5,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{}
|
||||
18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{}
|
||||
//
|
||||
18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1; },{},{}
|
||||
18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine()>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1; },{},{}
|
||||
18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{}
|
||||
//
|
||||
18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{}
|
||||
|
@ -307,7 +307,7 @@
|
||||
199,9,6,1,7,0x40,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_BLOODDRAIN,Sucking Blood
|
||||
200,9,6,1,7,0,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_ENERGYDRAIN,Energy Drain
|
||||
201,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_KEEPING,Keeping
|
||||
202,9,6,1,7,0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath
|
||||
202,9,6,1,7,0xC0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath
|
||||
203,9,6,1,7,0x1,0,10,1,no,0,0x2,0,magic,0,0x0, NPC_DARKBLESSING,Dark Blessing
|
||||
204,0,0,4,0,0x1,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_BARRIER,Barrier
|
||||
205,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_DEFENDER,Defender
|
||||
|
@ -1929,7 +1929,7 @@ morocc,134,111,3 script Bard#3 741,{
|
||||
mes "There's no reason to be afraid of this riffraff, your Uncle Kino is here, okay?";
|
||||
} else if (BaseClass == Job_Assassin) {
|
||||
mes "There's no reason to be afraid. I know that person looks scary, but you're a good girl, so you'll be okay.";
|
||||
} else if (BaeClass == Job_Blacksmith) {
|
||||
} else if (BaseClass == Job_Blacksmith) {
|
||||
mes "There's no reason to be scared, honey. It's just a Blacksmith.";
|
||||
} else {
|
||||
mes "There's no reason to be scared. See...? That person won't hurt you.";
|
||||
|
@ -8560,9 +8560,9 @@ REPLACE INTO `item_db_re` VALUES (18730,'Cryptura_Academy_Hat','Cryptura Academy
|
||||
REPLACE INTO `item_db_re` VALUES (18737,'Fortier_Mask','Fortier Masque',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'10',0,876,'bonus bUnbreakableHelm,0;',NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18739,'Carnation_Hairband','Carnation Hairband',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',1,878,'bonus bLuk,1;',NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18740,'Hair_Of_The_Strong','Hair Of The Strong',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,879,NULL,NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18742,'C_MoonStar_Accessory','Moon and Stars',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,7,2,2048,NULL,'0',0,881,NULL,'sc_start SC_MOONSTAR,-1,0;','sc_end SC_MOONSTAR;');
|
||||
REPLACE INTO `item_db_re` VALUES (18742,'C_MoonStar_Accessory','Moon and Stars',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,881,NULL,'sc_start SC_MOONSTAR,-1,0;','sc_end SC_MOONSTAR;');
|
||||
REPLACE INTO `item_db_re` VALUES (18743,'Spirit_Of_Chung_E','Spirit Of Chung E',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,882,NULL,NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18744,'C_World_Star','Twilight',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,7,2,2048,NULL,'0',0,883,NULL,'sc_start SC_SUPER_STAR,-1,0;','sc_end SC_SUPER_STAR;');
|
||||
REPLACE INTO `item_db_re` VALUES (18744,'C_World_Star','Twilight',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,883,NULL,'sc_start SC_SUPER_STAR,-1,0;','sc_end SC_SUPER_STAR;');
|
||||
REPLACE INTO `item_db_re` VALUES (18745,'Choco_Stick_In_Mouth','Choco Stick In Mouth',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'10',0,884,NULL,NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18746,'Chilly_Breath','Chilly Breath',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'10',0,885,'bonus bInt,1;',NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18747,'Eyes_Of_Ifrit','Eyes Of Ifrit',5,20,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,512,NULL,'0',0,886,'bonus bDex,1;',NULL,NULL);
|
||||
@ -8575,7 +8575,7 @@ REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu H
|
||||
REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL);
|
||||
#
|
||||
REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine()>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL);
|
||||
REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL);
|
||||
#
|
||||
REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL);
|
||||
|
@ -2342,6 +2342,7 @@ REPLACE INTO `mob_db` VALUES (2476,'MG_AMDARAIS','Amdarias','Amdarias',143,32839
|
||||
#3154,RECON_ROBOT
|
||||
#3155,REPAIR_ROBOT
|
||||
#3156,EXPLORATION_ROVER
|
||||
#3166,M_E_DEVILING
|
||||
#
|
||||
#3201,JT_LUCKYCASE
|
||||
#3202,JT_ORGANIC_JAKK
|
||||
|
@ -37,7 +37,7 @@ Sql* sql_handle = NULL;
|
||||
int char_server_port = 3306;
|
||||
char char_server_ip[32] = "127.0.0.1";
|
||||
char char_server_id[32] = "ragnarok";
|
||||
char char_server_pw[32] = "ragnarok";
|
||||
char char_server_pw[32] = ""; // Allow user to send empty password (bugreport:7787)
|
||||
char char_server_db[32] = "ragnarok";
|
||||
char default_codepage[32] = ""; //Feature by irmin.
|
||||
|
||||
|
@ -407,6 +407,8 @@ struct mmo_charstatus {
|
||||
|
||||
// Char server addon system
|
||||
unsigned int character_moves;
|
||||
|
||||
bool cashshop_sent; // Whether the player has received the CashShop list
|
||||
};
|
||||
|
||||
typedef enum mail_status {
|
||||
|
@ -23,7 +23,7 @@ typedef struct AccountDB_SQL
|
||||
Sql* accounts; // SQL accounts storage
|
||||
|
||||
// global sql settings
|
||||
char global_db_hostname[32];
|
||||
char global_db_hostname[64]; // Doubled for long hostnames (bugreport:8003)
|
||||
uint16 global_db_port;
|
||||
char global_db_username[32];
|
||||
char global_db_password[32];
|
||||
|
@ -2103,9 +2103,10 @@ ACMD_FUNC(refine)
|
||||
refine = cap_value(refine, -MAX_REFINE, MAX_REFINE);
|
||||
|
||||
count = 0;
|
||||
for (j = 0; j < EQI_MAX-1; j++) {
|
||||
for (j = 0; j < EQI_MAX; j++) {
|
||||
if ((i = sd->equip_index[j]) < 0)
|
||||
continue;
|
||||
if(j == EQI_AMMO) continue;
|
||||
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == i)
|
||||
continue;
|
||||
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == i)
|
||||
|
@ -4694,7 +4694,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
||||
case KO_HAPPOKUNAI:
|
||||
break;
|
||||
default:
|
||||
wd.damage += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage, is_attack_left_handed(src, skill_id), wd.flag);
|
||||
wd.damage += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage, 0, wd.flag);
|
||||
if(is_attack_left_handed(src, skill_id))
|
||||
wd.damage2 += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage2, 1, wd.flag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -5551,8 +5553,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
|
||||
md.damage=3;
|
||||
break;
|
||||
case NPC_DARKBREATH:
|
||||
md.damage = 500 + (skill_lv-1)*1000 + rnd()%1000;
|
||||
if(md.damage > 9999) md.damage = 9999;
|
||||
md.damage = tstatus->max_hp * (skill_lv * 10) / 100;
|
||||
break;
|
||||
case PA_PRESSURE:
|
||||
md.damage=500+300*skill_lv;
|
||||
@ -7262,6 +7263,7 @@ static const struct _battle_data {
|
||||
{ "emblem_woe_change", &battle_config.emblem_woe_change, 0, 0, 1, },
|
||||
{ "emblem_transparency_limit", &battle_config.emblem_transparency_limit, 80, 0, 100, },
|
||||
{ "discount_item_point_shop", &battle_config.discount_item_point_shop, 0, 0, 3, },
|
||||
{ "update_enemy_position", &battle_config.update_enemy_position, 0, 0, 1, },
|
||||
};
|
||||
#ifndef STATS_OPT_OUT
|
||||
/**
|
||||
|
@ -513,6 +513,7 @@ extern struct Battle_Config
|
||||
int emblem_woe_change;
|
||||
int emblem_transparency_limit;
|
||||
int discount_item_point_shop;
|
||||
int update_enemy_position;
|
||||
} battle_config;
|
||||
|
||||
void do_init_battle(void);
|
||||
|
@ -326,7 +326,8 @@ static int clif_send_sub(struct block_list *bl, va_list ap)
|
||||
return 0;
|
||||
|
||||
/* unless visible, hold it here */
|
||||
if (clif_ally_only && !sd->special_state.intravision && battle_check_target(src_bl,&sd->bl,BCT_ENEMY) > 0)
|
||||
if (!battle_config.update_enemy_position && clif_ally_only && !sd->special_state.intravision &&
|
||||
!sd->sc.data[SC_INTRAVISION] && battle_check_target(src_bl,&sd->bl,BCT_ENEMY) > 0)
|
||||
return 0;
|
||||
|
||||
WFIFOHEAD(fd, len);
|
||||
@ -1918,6 +1919,22 @@ void clif_scriptclose(struct map_session_data *sd, int npcid)
|
||||
WFIFOSET(fd,packet_len(0xb6));
|
||||
}
|
||||
|
||||
/// [Ind/Hercules]
|
||||
/// Close script when player is idle
|
||||
/// 08d6 <npc id>.L
|
||||
void clif_scriptclear(struct map_session_data *sd, int npcid)
|
||||
{
|
||||
int fd;
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd=sd->fd;
|
||||
WFIFOHEAD(fd, packet_len(0x8d6));
|
||||
WFIFOW(fd,0)=0x8d6;
|
||||
WFIFOL(fd,2)=npcid;
|
||||
WFIFOSET(fd,packet_len(0x8d6));
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
*
|
||||
*------------------------------------------*/
|
||||
@ -2485,10 +2502,12 @@ void clif_equiplist(struct map_session_data *sd)
|
||||
|
||||
void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length)
|
||||
{
|
||||
static const int client_buf = 0x5000; // Max buffer to send
|
||||
struct item_data *id;
|
||||
int i,n,ne;
|
||||
int i,n,ne,nn;
|
||||
unsigned char *buf;
|
||||
unsigned char *bufe;
|
||||
unsigned char *bufn;
|
||||
#if PACKETVER < 5
|
||||
const int s = 10; //Entry size.normal item
|
||||
const int sidx=4; //start itemlist idx
|
||||
@ -2533,33 +2552,39 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
|
||||
n++;
|
||||
}
|
||||
}
|
||||
if( n )
|
||||
for (i = 0; i < n;) // Loop through non-equipable items
|
||||
{
|
||||
nn = n - i < (client_buf - 4)/s ? n - i : (client_buf - 4)/s; // Split up non-equipable items
|
||||
bufn = buf + i*s; // Update buffer to new index range
|
||||
i += nn;
|
||||
#if PACKETVER < 5
|
||||
WBUFW(buf,0)=0xa5;
|
||||
WBUFW(bufn,0)=0xa5;
|
||||
#elif PACKETVER < 20080102
|
||||
WBUFW(buf,0)=0x1f0;
|
||||
WBUFW(bufn,0)=0x1f0;
|
||||
#elif PACKETVER < 20120925
|
||||
WBUFW(buf,0)=0x2ea;
|
||||
WBUFW(bufn,0)=0x2ea;
|
||||
#else
|
||||
WBUFW(buf,0)=0x995;
|
||||
WBUFW(bufn,0)=0x995;
|
||||
memset((char*)WBUFP(buf,4),0,24); //storename
|
||||
#endif
|
||||
WBUFW(buf,2)=n*s+sidx;
|
||||
clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
|
||||
WBUFW(bufn,2)=4+nn*s;
|
||||
clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF);
|
||||
}
|
||||
if( ne )
|
||||
for (i = 0; i < ne;) // Loop through equipable items
|
||||
{
|
||||
nn = ne - i < (client_buf - 4)/se ? ne - i : (client_buf - 4)/se; // Split up equipable items
|
||||
bufn = bufe + i*se; // Update buffer to new index range
|
||||
i += nn;
|
||||
#if PACKETVER < 20071002
|
||||
WBUFW(bufe,0)=0xa6;
|
||||
WBUFW(bufn,0)=0xa6;
|
||||
#elif PACKETVER < 20120925
|
||||
WBUFW(bufe,0)=0x2d1;
|
||||
WBUFW(bufn,0)=0x2d1;
|
||||
#else
|
||||
WBUFW(bufe,0)=0x996;
|
||||
memset((char*)WBUFP(bufe,4),0,24); //storename
|
||||
WBUFW(bufn,0)=0x996;
|
||||
memset((char*)WBUFP(bufn,4),0,24); //storename
|
||||
#endif
|
||||
WBUFW(bufe,2)=ne*se+sidxe;
|
||||
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
||||
WBUFW(bufn,2)=4+nn*se;
|
||||
clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF);
|
||||
}
|
||||
|
||||
if( buf ) aFree(buf);
|
||||
@ -14801,7 +14826,7 @@ void clif_cashshop_list( int fd ){
|
||||
int tab;
|
||||
|
||||
for( tab = CASHSHOP_TAB_NEW; tab < CASHSHOP_TAB_SEARCH; tab++ ){
|
||||
int length = 8 + cash_shop_items->count * 6;
|
||||
int length = 8 + cash_shop_items[tab].count * 6;
|
||||
int i, offset;
|
||||
|
||||
WFIFOHEAD( fd, length );
|
||||
@ -14820,7 +14845,10 @@ void clif_cashshop_list( int fd ){
|
||||
}
|
||||
|
||||
void clif_parse_cashshop_list_request( int fd, struct map_session_data* sd ){
|
||||
if( !sd->status.cashshop_sent ) {
|
||||
clif_cashshop_list( fd );
|
||||
sd->status.cashshop_sent = true;
|
||||
}
|
||||
}
|
||||
/// List of items offered in a cash shop (ZC_PC_CASH_POINT_ITEMLIST).
|
||||
/// 0287 <packet len>.W <cash point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }*
|
||||
@ -17529,7 +17557,7 @@ void packetdb_readdb(void)
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
//#0x08C0
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
|
||||
9, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
9, 7, 10, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
//#0x0900
|
||||
|
@ -392,6 +392,7 @@ void clif_selllist(struct map_session_data *sd); //self
|
||||
void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes); //self
|
||||
void clif_scriptnext(struct map_session_data *sd,int npcid); //self
|
||||
void clif_scriptclose(struct map_session_data *sd, int npcid); //self
|
||||
void clif_scriptclear(struct map_session_data *sd, int npcid); //self
|
||||
void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes); //self
|
||||
void clif_scriptinput(struct map_session_data *sd, int npcid); //self
|
||||
void clif_scriptinputstr(struct map_session_data *sd, int npcid); // self
|
||||
|
@ -2598,7 +2598,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
||||
else if( sd->avail_quests )
|
||||
quest_update_objective(sd, md->class_);
|
||||
|
||||
if( sd->md && src && src->type != BL_HOM && mob_db(md->class_)->lv > sd->status.base_level/2 )
|
||||
if( sd->md && src && src->type == BL_MER && mob_db(md->class_)->lv > sd->status.base_level/2 )
|
||||
mercenary_kills(sd->md);
|
||||
}
|
||||
|
||||
|
15
src/map/pc.c
15
src/map/pc.c
@ -1141,6 +1141,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
|
||||
}
|
||||
#endif
|
||||
|
||||
// Player has not yet received the CashShop list
|
||||
sd->status.cashshop_sent = false;
|
||||
|
||||
// Request all registries (auth is considered completed whence they arrive)
|
||||
intif_request_registry(sd,7);
|
||||
return true;
|
||||
@ -1976,8 +1979,8 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c
|
||||
if( autobonus[i].bonus_script )
|
||||
{
|
||||
int j;
|
||||
ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
|
||||
if( j < EQI_MAX-1 )
|
||||
ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
|
||||
if( j < EQI_MAX )
|
||||
script_run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]);
|
||||
}
|
||||
continue;
|
||||
@ -2007,8 +2010,8 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
|
||||
if( autobonus->other_script )
|
||||
{
|
||||
int j;
|
||||
ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
|
||||
if( j < EQI_MAX-1 )
|
||||
ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
|
||||
if( j < EQI_MAX )
|
||||
script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
|
||||
}
|
||||
|
||||
@ -6747,6 +6750,7 @@ void pc_close_npc(struct map_session_data *sd,int flag)
|
||||
sd->npc_idle_timer = INVALID_TIMER;
|
||||
#endif
|
||||
clif_scriptclose(sd,sd->npc_id);
|
||||
clif_scriptclear(sd,sd->npc_id); // [Ind/Hercules]
|
||||
if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting
|
||||
script_free_state(sd->st);
|
||||
sd->st = NULL;
|
||||
@ -7932,9 +7936,6 @@ int pc_setcart(struct map_session_data *sd,int type) {
|
||||
if( pc_checkskill(sd,MC_PUSHCART) <= 0 && type != 0 )
|
||||
return 1;// Push cart is required
|
||||
|
||||
if( type == 0 && pc_iscarton(sd) )
|
||||
status_change_end(&sd->bl,SC_GN_CARTBOOST,INVALID_TIMER);
|
||||
|
||||
#ifdef NEW_CARTS
|
||||
|
||||
switch( type ) {
|
||||
|
147
src/map/script.c
147
src/map/script.c
@ -6103,7 +6103,7 @@ BUILDIN_FUNC(countitem)
|
||||
}
|
||||
|
||||
data = script_getdata(st,2);
|
||||
get_val(st, data); // convert into value in case of a variable
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
|
||||
if( data_isstring(data) ) // item name
|
||||
id = itemdb_searchname(conv_str(st, data));
|
||||
@ -6220,7 +6220,7 @@ BUILDIN_FUNC(checkweight)
|
||||
|
||||
for(i=2; i<nbargs; i=i+2) {
|
||||
data = script_getdata(st,i);
|
||||
get_val(st, data); // convert into value in case of a variable
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( data_isstring(data) ) // item name
|
||||
id = itemdb_searchname(conv_str(st, data));
|
||||
else // item id
|
||||
@ -7878,6 +7878,7 @@ BUILDIN_FUNC(bonus)
|
||||
int val4 = 0;
|
||||
int val5 = 0;
|
||||
TBL_PC* sd;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
@ -7902,7 +7903,9 @@ BUILDIN_FUNC(bonus)
|
||||
case SP_FIXCASTRATE:
|
||||
case SP_SKILL_USE_SP:
|
||||
// these bonuses support skill names
|
||||
val1 = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
data = script_getdata(st, 3);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
val1 = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
break;
|
||||
default:
|
||||
val1 = script_getnum(st,3);
|
||||
@ -7923,7 +7926,9 @@ BUILDIN_FUNC(bonus)
|
||||
pc_bonus3(sd, type, val1, val2, val3);
|
||||
break;
|
||||
case 4:
|
||||
if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) )
|
||||
data = script_getdata(st, 4);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( type == SP_AUTOSPELL_ONSKILL && data_isstring(data) )
|
||||
val2 = skill_name2id(script_getstr(st,4)); // 2nd value can be skill name
|
||||
else
|
||||
val2 = script_getnum(st,4);
|
||||
@ -7933,7 +7938,9 @@ BUILDIN_FUNC(bonus)
|
||||
pc_bonus4(sd, type, val1, val2, val3, val4);
|
||||
break;
|
||||
case 5:
|
||||
if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) )
|
||||
data = script_getdata(st, 4);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( type == SP_AUTOSPELL_ONSKILL && data_isstring(data) )
|
||||
val2 = skill_name2id(script_getstr(st,4)); // 2nd value can be skill name
|
||||
else
|
||||
val2 = script_getnum(st,4);
|
||||
@ -8031,6 +8038,7 @@ BUILDIN_FUNC(autobonus3)
|
||||
short rate,atk_type;
|
||||
TBL_PC* sd;
|
||||
const char *bonus_script, *other_script = NULL;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
@ -8041,7 +8049,9 @@ BUILDIN_FUNC(autobonus3)
|
||||
|
||||
rate = script_getnum(st,3);
|
||||
dur = script_getnum(st,4);
|
||||
atk_type = ( script_isstring(st,5) ? skill_name2id(script_getstr(st,5)) : script_getnum(st,5) );
|
||||
data = script_getdata(st, 5);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
atk_type = ( data_isstring(data) ? skill_name2id(script_getstr(st,5)) : script_getnum(st,5) );
|
||||
bonus_script = script_getstr(st,2);
|
||||
if( !rate || !dur || !atk_type || !bonus_script )
|
||||
return 0;
|
||||
@ -8076,12 +8086,15 @@ BUILDIN_FUNC(skill)
|
||||
int level;
|
||||
int flag = 1;
|
||||
TBL_PC* sd;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
return 0;// no player attached, report source
|
||||
|
||||
id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
level = script_getnum(st,3);
|
||||
if( script_hasdata(st,4) )
|
||||
flag = script_getnum(st,4);
|
||||
@ -8105,12 +8118,15 @@ BUILDIN_FUNC(addtoskill)
|
||||
int level;
|
||||
int flag = 2;
|
||||
TBL_PC* sd;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
return 0;// no player attached, report source
|
||||
|
||||
id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
level = script_getnum(st,3);
|
||||
if( script_hasdata(st,4) )
|
||||
flag = script_getnum(st,4);
|
||||
@ -8129,12 +8145,15 @@ BUILDIN_FUNC(guildskill)
|
||||
int level;
|
||||
TBL_PC* sd;
|
||||
int i;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
return 0;// no player attached, report source
|
||||
|
||||
id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
level = script_getnum(st,3);
|
||||
for( i=0; i < level; i++ )
|
||||
guild_skillup(sd, id);
|
||||
@ -8150,12 +8169,15 @@ BUILDIN_FUNC(getskilllv)
|
||||
{
|
||||
int id;
|
||||
TBL_PC* sd;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
return 0;// no player attached, report source
|
||||
|
||||
id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
script_pushint(st, pc_checkskill(sd,id));
|
||||
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
@ -8170,9 +8192,12 @@ BUILDIN_FUNC(getgdskilllv)
|
||||
int guild_id;
|
||||
uint16 skill_id;
|
||||
struct guild* g;
|
||||
struct script_data *data;
|
||||
|
||||
guild_id = script_getnum(st,2);
|
||||
skill_id = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
data = script_getdata(st, 3);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
g = guild_search(guild_id);
|
||||
if( g == NULL )
|
||||
script_pushint(st, -1);
|
||||
@ -8702,12 +8727,15 @@ BUILDIN_FUNC(itemskill)
|
||||
int id;
|
||||
int lv;
|
||||
TBL_PC* sd;
|
||||
struct script_data *data;
|
||||
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL || sd->ud.skilltimer != INVALID_TIMER )
|
||||
return 0;
|
||||
|
||||
id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
lv = script_getnum(st,3);
|
||||
|
||||
sd->skillitem=id;
|
||||
@ -12599,6 +12627,7 @@ BUILDIN_FUNC(petheal)
|
||||
BUILDIN_FUNC(petskillattack)
|
||||
{
|
||||
struct pet_data *pd;
|
||||
struct script_data *data;
|
||||
TBL_PC *sd=script_rid2sd(st);
|
||||
|
||||
if(sd==NULL || sd->pd==NULL)
|
||||
@ -12608,7 +12637,9 @@ BUILDIN_FUNC(petskillattack)
|
||||
if (pd->a_skill == NULL)
|
||||
pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack));
|
||||
|
||||
pd->a_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
pd->a_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
pd->a_skill->lv=script_getnum(st,3);
|
||||
pd->a_skill->div_ = 0;
|
||||
pd->a_skill->rate=script_getnum(st,4);
|
||||
@ -12624,6 +12655,7 @@ BUILDIN_FUNC(petskillattack)
|
||||
BUILDIN_FUNC(petskillattack2)
|
||||
{
|
||||
struct pet_data *pd;
|
||||
struct script_data *data;
|
||||
TBL_PC *sd=script_rid2sd(st);
|
||||
|
||||
if(sd==NULL || sd->pd==NULL)
|
||||
@ -12633,7 +12665,9 @@ BUILDIN_FUNC(petskillattack2)
|
||||
if (pd->a_skill == NULL)
|
||||
pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack));
|
||||
|
||||
pd->a_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
pd->a_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
pd->a_skill->lv=script_getnum(st,3);
|
||||
pd->a_skill->div_ = script_getnum(st,4);
|
||||
pd->a_skill->rate=script_getnum(st,5);
|
||||
@ -12649,6 +12683,7 @@ BUILDIN_FUNC(petskillattack2)
|
||||
BUILDIN_FUNC(petskillsupport)
|
||||
{
|
||||
struct pet_data *pd;
|
||||
struct script_data *data;
|
||||
TBL_PC *sd=script_rid2sd(st);
|
||||
|
||||
if(sd==NULL || sd->pd==NULL)
|
||||
@ -12667,7 +12702,9 @@ BUILDIN_FUNC(petskillsupport)
|
||||
} else //init memory
|
||||
pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support));
|
||||
|
||||
pd->s_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
pd->s_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
pd->s_skill->lv=script_getnum(st,3);
|
||||
pd->s_skill->delay=script_getnum(st,4);
|
||||
pd->s_skill->hp=script_getnum(st,5);
|
||||
@ -12689,9 +12726,12 @@ BUILDIN_FUNC(petskillsupport)
|
||||
BUILDIN_FUNC(skilleffect)
|
||||
{
|
||||
TBL_PC *sd;
|
||||
uint16 skill_id, skill_lv;
|
||||
struct script_data *data = script_getdata(st, 2);
|
||||
|
||||
uint16 skill_id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
uint16 skill_lv=script_getnum(st,3);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
skill_lv=script_getnum(st,3);
|
||||
sd=script_rid2sd(st);
|
||||
|
||||
clif_skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1);
|
||||
@ -12706,11 +12746,15 @@ BUILDIN_FUNC(skilleffect)
|
||||
BUILDIN_FUNC(npcskilleffect)
|
||||
{
|
||||
struct block_list *bl= map_id2bl(st->oid);
|
||||
uint16 skill_id, skill_lv;
|
||||
int x, y;
|
||||
struct script_data *data = script_getdata(st, 2);
|
||||
|
||||
uint16 skill_id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
uint16 skill_lv=script_getnum(st,3);
|
||||
int x=script_getnum(st,4);
|
||||
int y=script_getnum(st,5);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
|
||||
skill_lv=script_getnum(st,3);
|
||||
x=script_getnum(st,4);
|
||||
y=script_getnum(st,5);
|
||||
|
||||
if (bl)
|
||||
clif_skill_poseffect(bl,skill_id,skill_lv,x,y,gettick());
|
||||
@ -12955,7 +12999,10 @@ BUILDIN_FUNC(recovery)
|
||||
case 4:
|
||||
{
|
||||
struct s_mapiterator *iter;
|
||||
if(script_hasdata(st,3) && !script_isstring(st,3))
|
||||
struct script_data *data = script_getdata(st, 3);
|
||||
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if(script_hasdata(st,3) && !data_isstring(data))
|
||||
revive = script_getnum(st,3); // recovery 4,<revive_flag>;
|
||||
iter = mapit_getallusers();
|
||||
for (sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) {
|
||||
@ -14517,7 +14564,10 @@ BUILDIN_FUNC(replacestr)
|
||||
}
|
||||
|
||||
if(script_hasdata(st, 5)) {
|
||||
if( !script_isstring(st,5) )
|
||||
struct script_data *data = script_getdata(st, 5);
|
||||
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( !data_isstring(data) )
|
||||
usecase = script_getnum(st, 5) != 0;
|
||||
else {
|
||||
ShowError("script:replacestr: Invalid usecase value. Expected int got string\n");
|
||||
@ -14598,7 +14648,11 @@ BUILDIN_FUNC(countstr)
|
||||
}
|
||||
|
||||
if(script_hasdata(st, 4)) {
|
||||
if( !script_isstring(st,4) )
|
||||
struct script_data *data;
|
||||
|
||||
data = script_getdata(st, 4);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( !data_isstring(data) )
|
||||
usecase = script_getnum(st, 4) != 0;
|
||||
else {
|
||||
ShowError("script:countstr: Invalid usecase value. Expected int got string\n");
|
||||
@ -15167,9 +15221,12 @@ BUILDIN_FUNC(setitemscript)
|
||||
BUILDIN_FUNC(addmonsterdrop)
|
||||
{
|
||||
struct mob_db *mob;
|
||||
struct script_data *data;
|
||||
int item_id,rate,i,c = 0;
|
||||
|
||||
if(script_isstring(st,2))
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if(data_isstring(data))
|
||||
mob = mob_db(mobdb_searchname(script_getstr(st,2)));
|
||||
else
|
||||
mob = mob_db(script_getnum(st,2));
|
||||
@ -15219,9 +15276,12 @@ BUILDIN_FUNC(addmonsterdrop)
|
||||
BUILDIN_FUNC(delmonsterdrop)
|
||||
{
|
||||
struct mob_db *mob;
|
||||
struct script_data *data;
|
||||
int item_id,i;
|
||||
|
||||
if(script_isstring(st,2))
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if(data_isstring(data))
|
||||
mob = mob_db(mobdb_searchname(script_getstr(st,2)));
|
||||
else
|
||||
mob = mob_db(script_getnum(st,2));
|
||||
@ -15764,9 +15824,12 @@ BUILDIN_FUNC(unitskilluseid)
|
||||
uint16 skill_lv;
|
||||
int target_id;
|
||||
struct block_list* bl;
|
||||
struct script_data *data;
|
||||
|
||||
unit_id = script_getnum(st,2);
|
||||
skill_id = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
data = script_getdata(st, 3);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
skill_lv = script_getnum(st,4);
|
||||
target_id = ( script_hasdata(st,5) ? script_getnum(st,5) : unit_id );
|
||||
|
||||
@ -15789,9 +15852,12 @@ BUILDIN_FUNC(unitskillusepos)
|
||||
int skill_x;
|
||||
int skill_y;
|
||||
struct block_list* bl;
|
||||
struct script_data *data;
|
||||
|
||||
unit_id = script_getnum(st,2);
|
||||
skill_id = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
data = script_getdata(st, 3);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) );
|
||||
skill_lv = script_getnum(st,4);
|
||||
skill_x = script_getnum(st,5);
|
||||
skill_y = script_getnum(st,6);
|
||||
@ -16921,6 +16987,7 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap)
|
||||
BUILDIN_FUNC(areamobuseskill)
|
||||
{
|
||||
struct block_list center;
|
||||
struct script_data *data;
|
||||
int16 m;
|
||||
int range,mobid,skill_id,skill_lv,casttime,emotion,target,cancel;
|
||||
|
||||
@ -16934,7 +17001,9 @@ BUILDIN_FUNC(areamobuseskill)
|
||||
center.y = script_getnum(st,4);
|
||||
range = script_getnum(st,5);
|
||||
mobid = script_getnum(st,6);
|
||||
skill_id = ( script_isstring(st,7) ? skill_name2id(script_getstr(st,7)) : script_getnum(st,7) );
|
||||
data = script_getdata(st, 7);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,7)) : script_getnum(st,7) );
|
||||
if( (skill_lv = script_getnum(st,8)) > battle_config.mob_max_skilllvl )
|
||||
skill_lv = battle_config.mob_max_skilllvl;
|
||||
|
||||
@ -17218,9 +17287,13 @@ BUILDIN_FUNC(getcharip)
|
||||
/* check if a character name is specified */
|
||||
if( script_hasdata(st, 2) )
|
||||
{
|
||||
if (script_isstring(st, 2))
|
||||
struct script_data *data;
|
||||
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if (data_isstring(data))
|
||||
sd = map_nick2sd(script_getstr(st, 2));
|
||||
else if (script_isint(st, 2) || script_getnum(st, 2))
|
||||
else if (data_isint(data) || script_getnum(st, 2))
|
||||
{
|
||||
int id = 0;
|
||||
id = script_getnum(st, 2);
|
||||
@ -17527,8 +17600,11 @@ BUILDIN_FUNC(npcskill)
|
||||
unsigned int npc_level;
|
||||
struct npc_data *nd;
|
||||
struct map_session_data *sd;
|
||||
struct script_data *data;
|
||||
|
||||
skill_id = script_isstring(st, 2) ? skill_name2id(script_getstr(st, 2)) : script_getnum(st, 2);
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
skill_id = data_isstring(data) ? skill_name2id(script_getstr(st, 2)) : script_getnum(st, 2);
|
||||
skill_level = script_getnum(st, 3);
|
||||
stat_point = script_getnum(st, 4);
|
||||
npc_level = script_getnum(st, 5);
|
||||
@ -18041,11 +18117,14 @@ BUILDIN_FUNC(montransform) {
|
||||
enum sc_type type;
|
||||
char msg[CHAT_SIZE_MAX];
|
||||
int tick, mob_id, val1, val2, val3, val4;
|
||||
struct script_data *data;
|
||||
|
||||
if( (sd = script_rid2sd(st)) == NULL )
|
||||
return 1;
|
||||
|
||||
if( script_isstring(st, 2) )
|
||||
data = script_getdata(st, 2);
|
||||
get_val(st, data); // Convert into value in case of a variable
|
||||
if( data_isstring(data) )
|
||||
mob_id = mobdb_searchname(script_getstr(st, 2));
|
||||
else
|
||||
mob_id = mobdb_checkid(script_getnum(st, 2));
|
||||
@ -18055,7 +18134,7 @@ BUILDIN_FUNC(montransform) {
|
||||
val1 = val2 = val3 = val4 = 0;
|
||||
|
||||
if (mob_id == 0) {
|
||||
if( script_isstring(st,2) )
|
||||
if( data_isstring(data) )
|
||||
ShowWarning("buildin_montransform: Attempted to use non-existing monster '%s'.\n", script_getstr(st, 2));
|
||||
else
|
||||
ShowWarning("buildin_montransform: Attempted to use non-existing monster of ID '%d'.\n", script_getnum(st, 2));
|
||||
|
@ -2587,10 +2587,11 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
||||
pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
|
||||
|
||||
// Parse equipment
|
||||
for(i=0;i<EQI_MAX-1;i++) {
|
||||
for(i=0;i<EQI_MAX;i++) {
|
||||
current_equip_item_index = index = sd->equip_index[i]; // We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
|
||||
if(index < 0)
|
||||
continue;
|
||||
if(i == EQI_AMMO) continue;
|
||||
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
|
||||
continue;
|
||||
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
|
||||
@ -2737,10 +2738,11 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
||||
status->def += (refinedef+50)/100;
|
||||
|
||||
// Parse Cards
|
||||
for(i=0;i<EQI_MAX-1;i++) {
|
||||
for(i=0;i<EQI_MAX;i++) {
|
||||
current_equip_item_index = index = sd->equip_index[i]; // We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
|
||||
if(index < 0)
|
||||
continue;
|
||||
if(i == EQI_AMMO) continue;
|
||||
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
|
||||
continue;
|
||||
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
|
||||
@ -9279,7 +9281,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
break;
|
||||
case SC_OFFERTORIUM:
|
||||
val2 = 30 * val1; // heal power bonus
|
||||
val3 = 20 * val1; // sp cost inc
|
||||
val3 = 100 + (20 * val1); // sp cost inc
|
||||
break;
|
||||
case SC_FRIGG_SONG:
|
||||
val2 = 5 * val1; // maxhp bonus
|
||||
|
Loading…
x
Reference in New Issue
Block a user