Skip to content
Permalink
Browse files
ReqItems and Various Fixs
-Add requiered equiped item to cast in skill_require_db.
-Fix SC_ASH not always giving 50% chance failing, wrong emplacement
-Fix SC_STYLE_CHANGE not being relaunch when eleanor resurected.
-Fix cardfix for target not being reseted and therefor using same value
as caster.
-Move ADJUST_SKILL_DAMAGE in battle_calc_weapon_final_atk_modifiers
(since it shuold alter the final dammage just like it do for magic and
misc)
-Add battle_do_reflect and skill_do_copy small function to encapsulate
code.
-Upd channel_clean and channel_delete to simplify autodelete case for
public chans
-Fix SC_FEINTBOMB that had a fixed blewcount and not 3*skilllv
-Fix SC_VACUUM_EXTREME where some scenario was setting scs_nomove to -1
and therefor blocking char forever.
-Fix SC_STRIKING where val1 was overwritten for sp cast but also used as
skilllv for critical bonus...
-Upd SC_GN_CARTBOOST, should be ending be DECREASE_AGI
-Upd SC_MAGNETICFIELD should be endend when getting earth dmg or
quagmire
-Mv SC_WARMER, SC_WHITEIMPRISON, SC_FREEZING ending other status section
in proper area.
  • Loading branch information
lighta committed Oct 8, 2013
1 parent 69b2829 commit c70762a18ff1c4e9666b5220f306ca0ef708a0c3
Showing with 1,313 additions and 1,207 deletions.
  1. +887 −886 db/re/skill_require_db.txt
  2. +197 −164 src/map/battle.c
  3. +6 −2 src/map/channel.c
  4. +6 −14 src/map/clif.c
  5. +2 −0 src/map/homunculus.c
  6. +16 −0 src/map/pc.c
  7. +1 −0 src/map/pc.h
  8. +153 −111 src/map/skill.c
  9. +4 −2 src/map/skill.h
  10. +41 −28 src/map/status.c

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -70,11 +70,14 @@ struct Channel* channel_create(char *name, char *pass, unsigned char color, enum
* return
* 0 : success
* -1 : invalid channel
* -2 : can't delete now
*/
int channel_delete(struct Channel *channel) {
if(!channel)
return -1;
else if( db_size(channel->users)) {
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;
DBIterator *iter = db_iterator(channel->users);
for( sd = dbi_first(iter); dbi_exists(iter); sd = dbi_next(iter) ) { //for all users
@@ -270,7 +273,8 @@ int channel_clean(struct Channel *channel, struct map_session_data *sd, int flag
}

idb_remove(channel->users,sd->status.char_id); //remove user for channel user list
if( !db_size(channel->users) && !(flag&1) && channel->type != CHAN_TYPE_PUBLIC )
//auto delete when no more user in
if( !db_size(channel->users) && !(flag&1) )
channel_delete(channel);

return 0;
@@ -5361,6 +5361,8 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
nullpo_retv(sd);
fd = sd->fd;

if(sd->menuskill_id == skill_id)
return; //Avoid resending the menu twice or more times...
WFIFOHEAD(fd, 6 + 2 * MAX_SKILL_PRODUCE_DB);
WFIFOW(fd,0) = 0x25a;
WFIFOW(fd,4) = list_type; // list type
@@ -5378,30 +5380,20 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
c++;
}

if( skill_id == AM_PHARMACY ) { // Only send it while Cooking else check for c.
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
}

if( c > 0 ) {
if( c > 0 || skill_id == AM_PHARMACY) {
sd->menuskill_id = skill_id;
sd->menuskill_val = trigger;
if( skill_id != AM_PHARMACY ) {
sd->menuskill_val2 = qty; // amount.
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
}
sd->menuskill_val2 = qty; // amount.
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
} else {
clif_menuskill_clear(sd);
if( skill_id != AM_PHARMACY ) { // AM_PHARMACY is used to Cooking.
// It fails.
#if PACKETVER >= 20090922
clif_msg_skill(sd,skill_id,0x625);
#else
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
#endif
}
}
}

@@ -973,6 +973,8 @@ void merc_hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)
clif_hominfo(sd,hd,1);
clif_hominfo(sd,hd,0);
clif_homskillinfoblock(sd);
if(hd->homunculus.class_ == 6052) //eleanor
sc_start(&hd->bl,&hd->bl, SC_STYLE_CHANGE, 100, MH_MD_FIGHTING, -1);
}

void merc_reset_stats(struct homun_data *hd)
@@ -5177,6 +5177,22 @@ int pc_checkequip(struct map_session_data *sd,int pos)
return -1;
}

/*==========================================
* Check if sd as nameid equiped somewhere
* -return true,false
*------------------------------------------*/
int pc_checkequip2(struct map_session_data *sd,int nameid){
int i;
for(i=0;i<EQI_MAX;i++){
if(equip_pos[i]){
int idx = sd->equip_index[i];
if (sd->status.inventory[idx].nameid == nameid)
return true;
}
}
return false;
}

/*==========================================
* Convert's from the client's lame Job ID system
* to the map server's 'makes sense' system. [Skotlex]
@@ -771,6 +771,7 @@ int pc_setinventorydata(struct map_session_data *sd);
int pc_checkskill(struct map_session_data *sd,uint16 skill_id);
int pc_checkallowskill(struct map_session_data *sd);
int pc_checkequip(struct map_session_data *sd,int pos);
int pc_checkequip2(struct map_session_data *sd,int nameid);

int pc_calc_skilltree(struct map_session_data *sd);
int pc_calc_skilltree_normalize_job(struct map_session_data *sd);

0 comments on commit c70762a

Please sign in to comment.