Follow up to 4d61cc0
Revert SONIC_CRAW consuming spheres. My mistake Update Eleanor skill damage formulas and spirit sphere consume requirements based on WarpPortal and iROWiki forums Fixed most channel memory leaks - http://rathena.org/board/tracker/issue-8044-memory-leak-revision-17486-causes-players-to-disconnect/ Fixed memory leak caused by item combos breaking out of a loop without freeing
This commit is contained in:
parent
c382dad802
commit
a506c7fc0e
@ -532,10 +532,10 @@ struct guild {
|
||||
struct guild_alliance alliance[MAX_GUILDALLIANCE];
|
||||
struct guild_expulsion expulsion[MAX_GUILDEXPULSION];
|
||||
struct guild_skill skill[MAX_GUILDSKILL];
|
||||
struct Channel *channel;
|
||||
|
||||
/* TODO: still used for something? */
|
||||
unsigned short save_flag; // for TXT saving
|
||||
void *channel;
|
||||
};
|
||||
|
||||
struct guild_castle {
|
||||
|
@ -3617,21 +3617,19 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
|
||||
skillratio += -100 + 70 * skill_lv;
|
||||
break;
|
||||
case MH_SONIC_CRAW:
|
||||
skillratio += -100 + 40 * skill_lv * status_get_lv(src);
|
||||
skillratio = skillratio/100; //@TODO uv1 factor need to be confirmed
|
||||
skillratio = 40 * skill_lv;
|
||||
break;
|
||||
case MH_SILVERVEIN_RUSH:
|
||||
skillratio += -100 + (150 * skill_lv * status_get_lv(src)) / 100;
|
||||
skillratio = 150 * skill_lv;
|
||||
break;
|
||||
case MH_MIDNIGHT_FRENZY:
|
||||
skillratio += -100 + (300 * skill_lv * status_get_lv(src)) / 150;
|
||||
skillratio = 300 * skill_lv;
|
||||
break;
|
||||
case MH_TINDER_BREAKER:
|
||||
skillratio += -100 + (100 * skill_lv + status_get_str(src));
|
||||
skillratio = (skillratio * status_get_lv(src)) / 120;
|
||||
skillratio = 100 * skill_lv;
|
||||
break;
|
||||
case MH_CBC:
|
||||
skillratio += 300 * skill_lv + 4 * status_get_lv(src);
|
||||
skillratio = 400 * skill_lv; //! TODO: This doesn't seem to be a ratio, but straight damage?
|
||||
break;
|
||||
case MH_MAGMA_FLOW:
|
||||
skillratio += -100 + 100 * skill_lv + 3 * status_get_lv(src);
|
||||
|
@ -75,7 +75,7 @@ struct Channel* channel_create(char *name, char *pass, unsigned char color, enum
|
||||
int channel_delete(struct Channel *channel) {
|
||||
if(!channel)
|
||||
return -1;
|
||||
if(channel->type == CHAN_TYPE_PUBLIC && runflag != MAPSERVER_ST_RUNNING) //only delete those serv stop
|
||||
if(channel->type == CHAN_TYPE_PUBLIC && runflag == MAPSERVER_ST_RUNNING) //only delete those serv stop
|
||||
return -2;
|
||||
if( db_size(channel->users)) {
|
||||
struct map_session_data *sd;
|
||||
@ -101,7 +101,6 @@ int channel_delete(struct Channel *channel) {
|
||||
}
|
||||
default:
|
||||
strdb_remove(channel_db, channel->name);
|
||||
aFree(channel);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -500,7 +500,6 @@ int guild_recv_info(struct guild *sg)
|
||||
DBData data;
|
||||
struct map_session_data *sd;
|
||||
bool guild_new = false;
|
||||
struct Channel *channel;
|
||||
|
||||
nullpo_ret(sg);
|
||||
|
||||
@ -545,10 +544,8 @@ int guild_recv_info(struct guild *sg)
|
||||
}
|
||||
|
||||
if(Channel_Config.ally_enable){
|
||||
channel = g->channel;
|
||||
if(!channel){
|
||||
channel = channel_create(Channel_Config.ally_chname,NULL,Channel_Config.ally_chcolor,CHAN_TYPE_ALLY,g->guild_id);
|
||||
g->channel = channel;
|
||||
if(!g->channel){
|
||||
g->channel = channel_create(Channel_Config.ally_chname,NULL,Channel_Config.ally_chcolor,CHAN_TYPE_ALLY,g->guild_id);
|
||||
channel_ajoin(g);
|
||||
}
|
||||
}
|
||||
|
@ -8537,8 +8537,10 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data ) {
|
||||
}
|
||||
|
||||
/* means we broke out of the count loop w/o finding all ids, we can move to the next combo */
|
||||
if( j < data->combos[i]->count )
|
||||
if( j < data->combos[i]->count ) {
|
||||
aFree(pair);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* we got here, means all items in the combo are matching */
|
||||
idx = sd->combos.count;
|
||||
|
@ -696,11 +696,11 @@ bool skill_isNotOk_hom(uint16 skill_id, struct homun_data *hd)
|
||||
break;
|
||||
case MH_CBC:
|
||||
if(!(hd->sc.data[SC_COMBO] && hd->sc.data[SC_COMBO]->val1 == MH_TINDER_BREAKER)
|
||||
|| !hd->homunculus.spiritball) return true;
|
||||
|| !hd->homunculus.spiritball < 2) return true;
|
||||
break;
|
||||
case MH_EQC:
|
||||
if(!(hd->sc.data[SC_COMBO] && hd->sc.data[SC_COMBO]->val1 == MH_CBC)
|
||||
|| !hd->homunculus.spiritball) return true;
|
||||
|| !hd->homunculus.spiritball < 3) return true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5009,19 +5009,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
|
||||
|
||||
case MH_STAHL_HORN:
|
||||
case MH_NEEDLE_OF_PARALYZE:
|
||||
case MH_SONIC_CRAW:
|
||||
skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag);
|
||||
break;
|
||||
case MH_MIDNIGHT_FRENZY:
|
||||
case MH_SILVERVEIN_RUSH:
|
||||
case MH_SONIC_CRAW:
|
||||
{
|
||||
TBL_HOM *hd = BL_CAST(BL_HOM,src);
|
||||
short remove_sphere = (skill_id==MH_SILVERVEIN_RUSH?1:2);
|
||||
|
||||
if(skill_id == MH_SONIC_CRAW)
|
||||
remove_sphere = hd->homunculus.spiritball;
|
||||
skill_attack(skill_get_type(skill_id),src,src,bl,skill_id,skill_lv,tick,flag);
|
||||
hom_delspiritball(hd,remove_sphere,0);
|
||||
hom_delspiritball(hd,skill_id==MH_SILVERVEIN_RUSH?1:2,0);
|
||||
}
|
||||
break;
|
||||
case MH_TINDER_BREAKER:
|
||||
@ -5031,7 +5027,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
|
||||
int duration=0;
|
||||
TBL_HOM *hd = BL_CAST(BL_HOM,src);
|
||||
duration = max(skill_lv,(status_get_str(src)/7 - status_get_str(bl)/10))*1000; //Yommy formula
|
||||
hom_delspiritball(hd,skill_id==MH_EQC?2:1,0); //only EQC consume 2 in grp 2
|
||||
hom_delspiritball(hd,skill_id==MH_EQC?3:2,0); //only EQC consume 3 in grp 2
|
||||
skill_attack(skill_get_type(skill_id),src,src,bl,skill_id,skill_lv,tick,flag);
|
||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,
|
||||
sc_start4(src,bl,status_skill2sc(skill_id),100,skill_lv,src->id,0,0,duration));
|
||||
|
Loading…
x
Reference in New Issue
Block a user