diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | db/re/item_combo_db.txt | 5 | ||||
-rw-r--r-- | db/re/item_db.conf | 2 | ||||
-rw-r--r-- | sql-files/item_db_re.sql | 2 | ||||
-rw-r--r-- | src/map/script.c | 122 | ||||
-rw-r--r-- | src/map/skill.c | 8 |
6 files changed, 57 insertions, 86 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a3eb53c5..d5599253f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -368,7 +368,7 @@ pre_re:debian-stable: image: debian:stable variables: <<: *base_vars - INSTALL_PACKAGES: gcc mysql-client libmysqlclient-dev + INSTALL_PACKAGES: gcc mariadb-client libmariadbclient-dev-compat script: - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql @@ -380,7 +380,7 @@ re:debian-stable: image: debian:stable variables: <<: *base_vars - INSTALL_PACKAGES: gcc mysql-client libmysqlclient-dev + INSTALL_PACKAGES: gcc mariadb-client libmariadbclient-dev-compat script: - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 33dbe499e..739be9a65 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -103,6 +103,7 @@ 2171:15053,{ bonus bAgi,2; } 2171:15056,{ bonus bAgi,2; } 2173:15055,{ bonus bFlee,10; bonus bFlee2,10; } +2183:15068:18776:20710:22015,{ bonus(bMaxHP, 900); bonus(bMaxSP, 100); bonus3(bAutoSpellWhenHit, HP_ASSUMPTIO, 1, 30); } 2198:5966,{ if (isequipped(4441)) {} else { if(getequiprefinerycnt(EQI_HAND_L)>6) { bonus2 bSkillCooldown,WL_COMET,-20000; } if(getequiprefinerycnt(EQI_HAND_L)>9) { bonus2 bSkillCooldown,WL_COMET,-20000; } } } 2254:18912,{ bonus2 bExpAddRace, RC_All, 5; } 2269:5781,{ bonus bMaxSP,30; bonus bInt,1; } @@ -294,6 +295,7 @@ 13035:28704,{ bonus bMaxSP,20; bonus bMaxHPrate,5; bonus bHit,10; bonus2 bAddSize,Size_Large,30; autobonus "{ bonus bAspdRate,100; }",1,7000,BF_WEAPON,"{ specialeffect(EF_POTION_BERSERK, AREA, playerattached()); }"; } 15041:18659,{ bonus2 bAddEle,Ele_Earth,10; bonus bDefEle,Ele_Fire; } 15061:19026,{ bonus2 bAddRaceTolerance,RC_Fish,10+getequiprefinerycnt(EQI_ARMOR); } +15068:20710,{ bonus(bAgi, 5); bonus(bFlee, 10); } 15128:20773,{ bonus bDelayrate,-10; bonus bFlee2,6; if(BaseLevel>130) { bonus bDelayrate,-10;} } 18507:18539,{ bonus bUseSPrate,-3; } 18607:18672,{ bonus bSPrecovRate,3; } @@ -305,7 +307,8 @@ 15117:20744:22047,{ bonus bMaxHP,25; bonus bMaxSP,25; bonus bSpeedRate,25; if (getequiprefinerycnt(EQI_GARMENT)+getequiprefinerycnt(EQI_SHOES)+getequiprefinerycnt(EQI_ARMOR) >= 30) { bonus bMaxHP,5; bonus bMaxSP,5; } } 18510:18511,{ bonus2 bAddRace,RC_Angel,3; } 18728:15061:2495:20700,{ bonus bAllStats, 1; bonus2 bSubEle, Ele_Water, 50; } -18776:20710,{ bonus bAgi,5; bonus bFlee,10; } +18776:20710,{ bonus(bBaseAtk, 10); } +18776:22015,{ bonus(bMatk, 20); } 18824:18825,{ bonus bMaxHP,100; bonus2 bSubEle,Ele_Neutral,getequiprefinerycnt(EQI_HEAD_TOP); } 18874:2109:2971,{ bonus bHPrecovRate,15; bonus bSPrecovRate,15; bonus bMatkRate,7; } 18997:28326:28327,{ bonus bSpeedRate,10; bonus bBaseAtk,50; bonus bMatk,50; if(getequiprefinerycnt(EQI_HEAD_TOP)>=9){ bonus bMaxHPrate,10; bonus bMaxSPrate,50; } } diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 22ef1a6cf..a082d8aff 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -137094,7 +137094,7 @@ item_db: ( Weight: 200 Def: 6 Slots: 1 - Loc: 512 + Loc: 256 EquipLv: 50 Refine: false View: 997 diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 55d91dcc8..8716a2bd4 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8846,7 +8846,7 @@ REPLACE INTO `item_db` VALUES ('18894','Rainbow_Star','Rainbow Star','5','0','0' REPLACE INTO `item_db` VALUES ('18895','Celestial_Dark_Flame','Celestial Dark Flame','5','0','0','200','0','0','5','0','0','18446744073709551615','63','2','512','0','50',NULL,'0','0','1008','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSubEle,Ele_Fire,5;','',''); REPLACE INTO `item_db` VALUES ('18896','Pterios_Fins','Pterios Fins','5','0','0','200','0','0','5','0','0','18446744073709551615','63','2','512','0','50',NULL,'0','0','1009','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSubEle,Ele_Fire,8;','',''); REPLACE INTO `item_db` VALUES ('18897','Azure_Diadem','Azure Diadem','5','0','0','200','0','0','5','0','0','18446744073709551615','63','2','512','0','50',NULL,'0','0','1010','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSubEle,Ele_Water,8;','',''); -REPLACE INTO `item_db` VALUES ('18898','Yggdrasil_Herald_Crown','Yggdrasil Herald Crown','5','0','0','200','0','0','6','0','1','18446744073709551615','63','2','512','0','50',NULL,'0','0','997','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAllStats,5; bonus bMaxHP,100; bonus bMaxSP,50; if(getrefine()>7) { bonus bMaxHPrate,getrefine()-7; bonus bFixedCastrate,-(getrefine()-7); }','',''); +REPLACE INTO `item_db` VALUES ('18898','Yggdrasil_Herald_Crown','Yggdrasil Herald Crown','5','0','0','200','0','0','6','0','1','18446744073709551615','63','2','256','0','50',NULL,'0','0','997','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAllStats,5; bonus bMaxHP,100; bonus bMaxSP,50; if(getrefine()>7) { bonus bMaxHPrate,getrefine()-7; bonus bFixedCastrate,-(getrefine()-7); }','',''); REPLACE INTO `item_db` VALUES ('18900','Weisswurst','Weisswurst','5','20','10','100','0','0','1','0','0','18446744073709551615','63','2','1','0','60',NULL,'0','0','1022','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('18901','Seppl_Hat','Seppl Hat','5','20','10','500','0','0','5','0','1','18446744073709551615','63','2','1','0','60',NULL,'1','0','1023','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('18908','Isabella_Red_Ear','Piamette\'s Red Ears','5','0','0','300','0','0','8','0','1','18446744073709551615','63','2','256','0','0',NULL,'1','0','1030','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bStr,5; bonus bMaxHPrate,5; bonus2 bSubEle,Ele_Fire,10; if(getrefine()>=9) { bonus bAspd,1+((getrefine()/2)-4); }','',''); diff --git a/src/map/script.c b/src/map/script.c index e20c79693..ee4bbf5ac 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13459,113 +13459,98 @@ BUILDIN(getequipcardcnt) /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. -/// successremovecards <slot>; +/// successremovecards(<slot>); BUILDIN(successremovecards) { - int i=-1,c,cardflag=0; + int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); - int num = script_getnum(st,2); + int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) - i=pc->checkequip(sd,script->equip[num-1]); + i = pc->checkequip(sd,script->equip[num - 1]); - if (i < 0 || !sd->inventory_data[i]) { + if (i < 0 || sd->inventory_data[i] == NULL) return true; - } - if(itemdb_isspecial(sd->status.inventory[i].card[0])) + if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; - for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) { - if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) {// extract this card from the item + for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { + if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { int flag; struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); + + memset(&item_tmp, 0, sizeof(item_tmp)); + cardflag = 1; - item_tmp.nameid = sd->status.inventory[i].card[c]; + item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; + sd->status.inventory[i].card[c] = 0; - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - // get back the cart in inventory - clif->additem(sd,0,0,flag); + if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } if (cardflag == 1) { - //if card was remove replace item with no card - int flag, j; - struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); - - item_tmp.nameid = sd->status.inventory[i].nameid; - item_tmp.identify = 1; - item_tmp.refine = sd->status.inventory[i].refine; - item_tmp.attribute = sd->status.inventory[i].attribute; - item_tmp.expire_time = sd->status.inventory[i].expire_time; - item_tmp.bound = sd->status.inventory[i].bound; - - for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) - item_tmp.card[j]=sd->status.inventory[i].card[j]; - - pc->delitem(sd, i, 1, 0, DELITEM_MATERIALCHANGE, LOG_TYPE_SCRIPT); - if ((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - //chk if can be spawn in inventory otherwise put on floor - clif->additem(sd,0,0,flag); - map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); - } - + pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); + clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); + clif->additem(sd, i, 1, 0); + pc->equipitem(sd, i, sd->status.inventory[i].equip); clif->misceffect(&sd->bl,3); } return true; } /// Removes all cards from the item found in the specified equipment slot of the invoking character. -/// failedremovecards <slot>, <type>; +/// failedremovecards(<slot>, <type>); /// <type>=0 : will destroy both the item and the cards. /// <type>=1 : will keep the item, but destroy the cards. /// <type>=2 : will keep the cards, but destroy the item. -/// <type>=? : will just display the failure effect. +/// <type>=3 : will just display the failure effect. BUILDIN(failedremovecards) { - int i=-1,c,cardflag=0; + int i = -1, c, cardflag = 0; + int num = script_getnum(st, 2); + int typefail = script_getnum(st, 3); struct map_session_data *sd = script->rid2sd(st); - int num = script_getnum(st,2); - int typefail = script_getnum(st,3); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) - i=pc->checkequip(sd,script->equip[num-1]); + i = pc->checkequip(sd, script->equip[num - 1]); - if (i < 0 || !sd->inventory_data[i]) + if (i < 0 || sd->inventory_data[i] == NULL) return true; - if(itemdb_isspecial(sd->status.inventory[i].card[0])) + if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; - for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) { - if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) { + for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { + if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { cardflag = 1; - if(typefail == 2) {// add cards to inventory, clear + sd->status.inventory[i].card[c] = 0; + + if (typefail == 2) { // add cards to inventory, clear int flag; struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); + memset(&item_tmp, 0, sizeof(item_tmp)); - item_tmp.nameid = sd->status.inventory[i].card[c]; + item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - clif->additem(sd,0,0,flag); + if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } @@ -13573,35 +13558,16 @@ BUILDIN(failedremovecards) } if (cardflag == 1) { - if (typefail == 0 || typefail == 2) { - // destroy the item + if (typefail == 0 || typefail == 2) { // destroy the item pc->delitem(sd, i, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_SCRIPT); } else if (typefail == 1) { - // destroy the card - int flag, j; - struct item item_tmp; - - memset(&item_tmp,0,sizeof(item_tmp)); - - item_tmp.nameid = sd->status.inventory[i].nameid; - item_tmp.identify = 1; - item_tmp.refine = sd->status.inventory[i].refine; - item_tmp.attribute = sd->status.inventory[i].attribute; - item_tmp.expire_time = sd->status.inventory[i].expire_time; - item_tmp.bound = sd->status.inventory[i].bound; - - for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) - item_tmp.card[j]=sd->status.inventory[i].card[j]; - - pc->delitem(sd, i, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_SCRIPT); - - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - clif->additem(sd,0,0,flag); - map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); - } - } - clif->misceffect(&sd->bl,2); + pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); + clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); + clif->additem(sd, i, 1, 0); + pc->equipitem(sd, i, sd->status.inventory[i].equip); + } } + clif->misceffect(&sd->bl, 2); return true; } @@ -21693,6 +21659,8 @@ BUILDIN(unbindatcmd) ARR_FIND(0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, atcmd) == 0); if( i < atcommand->binding_count ) { int cursor = 0; + aFree(atcommand->binding[i]->at_groups); + aFree(atcommand->binding[i]->char_groups); aFree(atcommand->binding[i]); atcommand->binding[i] = NULL; /* compact the list now that we freed a slot somewhere */ diff --git a/src/map/skill.c b/src/map/skill.c index b70ddc055..e187b7e8b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2555,7 +2555,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skill_id,skill_lv,BDT_MULTIHIT); break; case WL_CHAINLIGHTNING_ATK: - dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,WL_CHAINLIGHTNING,-2,BDT_SKILL); + dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,WL_CHAINLIGHTNING_ATK,-2,BDT_SKILL); break; case LG_OVERBRAND_BRANDISH: case LG_OVERBRAND: @@ -12156,7 +12156,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 struct skill_unit_group *sg; struct block_list *ss; struct map_session_data *tsd; - struct status_data *tstatus, *bst; + struct status_data *tstatus; struct status_change *tsc, *ssc; struct skill_unit_group_tickset *ts; enum sc_type type; @@ -12181,8 +12181,6 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 tstatus = status->get_status_data(bl); nullpo_ret(tstatus); - bst = status->get_base_status(bl); - nullpo_ret(bst); type = status->skill2sc(sg->skill_id); skill_id = sg->skill_id; @@ -12858,6 +12856,8 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 if (tsc && (tsc->data[SC_HALLUCINATIONWALK] || tsc->data[SC_VACUUM_EXTREME])) { return 0; } else { + struct status_data *bst = status->get_base_status(bl); + nullpo_ret(bst); sg->limit -= 1000 * bst->str/20; sc_start(ss, bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->limit); |