diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/charsave.c | 9 | ||||
-rw-r--r-- | src/map/chat.c | 2 | ||||
-rw-r--r-- | src/map/guild.c | 13 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/party.c | 11 |
6 files changed, 21 insertions, 22 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index f8f16c2b1..50bde0a58 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2317,7 +2317,7 @@ struct Damage battle_calc_magic_attack( sd->ignore_mdef_ele & (1<<tstatus->def_ele) || sd->ignore_mdef_race & (1<<tstatus->race) || sd->ignore_mdef_race & (is_boss(target)?1<<RC_BOSS:1<<RC_NONBOSS) - )) + )) flag.imdef = 1; } @@ -2348,8 +2348,8 @@ struct Damage battle_calc_magic_attack( ad.damage=battle_attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv); if (sd && flag.cardfix) { - short cardfix=100; short t_class = status_get_class(target); + short cardfix=100; cardfix=cardfix*(100+sd->magic_addrace[tstatus->race])/100; if (flag.elefix) diff --git a/src/map/charsave.c b/src/map/charsave.c index 4dcb59ecc..0c55164cb 100644 --- a/src/map/charsave.c +++ b/src/map/charsave.c @@ -26,7 +26,6 @@ struct mmo_charstatus *charsave_loadchar(int charid){ char *str_p;
friends = 0;
-// ShowDebug("charsave_loadchar : charid = %d | hd->master->status.char_id = %d\n", charid) ;
c = (struct mmo_charstatus *)aCalloc(1,sizeof(struct mmo_charstatus));
if(charid <= 0){
@@ -36,7 +35,7 @@ struct mmo_charstatus *charsave_loadchar(int charid){ }
// add homun_id [albator]
//Tested, Mysql 4.1.9+ has no problems with the long query, the buf is 65k big and the sql server needs for it 0.00009 secs on an athlon xp 2400+ WinXP (1GB Mem) .. [Sirius]
- sprintf(tmp_sql, "SELECT `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, `str`,`agi`,`vit`,`int`,`dex`,`luk`, `max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, `option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`hair`,`hair_color`, `clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, `last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`, `partner_id`, `father`, `mother`, `child`, `fame`, `homun_id` FROM `char` WHERE `char_id` = '%d'", charid);
+ sprintf(tmp_sql, "SELECT `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, `str`,`agi`,`vit`,`int`,`dex`,`luk`, `max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, `option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`hair`,`hair_color`, `clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, `last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`, `partner_id`, `father`, `mother`, `child`, `fame`, `homun_id` FROM `char` WHERE `char_id` = '%d'", charid);
if(mysql_query(&charsql_handle, tmp_sql)){
ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
@@ -103,9 +102,9 @@ struct mmo_charstatus *charsave_loadchar(int charid){ c->mother = atoi(charsql_row[44]);
c->child = atoi(charsql_row[45]);
c->fame = atoi(charsql_row[46]);
- c->hom_id = atoi(charsql_row[47]); // albator
- mysql_free_result(charsql_res);
+ c->hom_id = atoi(charsql_row[47]); // albator
+ mysql_free_result(charsql_res);
//Check for '0' Savepoint / LastPoint
if (c->last_point.x == 0 || c->last_point.y == 0 || c->last_point.map == 0){
@@ -240,7 +239,6 @@ struct mmo_charstatus *charsave_loadchar(int charid){ }
*/
-
//Shamelessly stolen from its_sparky (ie: thanks) and then assimilated by [Skotlex]
//Friend list
sprintf(tmp_sql, "SELECT f.friend_account, f.friend_id, c.name FROM friends f LEFT JOIN `char` c ON f.friend_account=c.account_id AND f.friend_id=c.char_id WHERE f.char_id='%d'", charid);
@@ -277,7 +275,6 @@ int charsave_savechar(int charid, struct mmo_charstatus *c){ // char tmp_str[64];
// char tmp_str2[512];
//First save the 'char'
- ShowDebug("charsave_savechar : charid = %d | hd->master->status.char_id = %d\n", charid) ;
sprintf(tmp_sql ,"UPDATE `char` SET `class`='%d', `base_level`='%d', `job_level`='%d',"
"`base_exp`='%d', `job_exp`='%d', `zeny`='%d',"
"`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d',"
diff --git a/src/map/chat.c b/src/map/chat.c index d031a446b..6d84aca4c 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -30,7 +30,7 @@ int chat_createchat(struct map_session_data *sd,int limit,int pub,char* pass,cha return 0; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
if (map[sd->bl.m].flag.nochat) {
- clif_displaymessage (sd->fd, msg_txt(281));
+ clif_displaymessage (sd->fd, msg_txt(281));
return 0; //Can't create chatrooms on this map.
}
pc_stop_walking(sd,1);
diff --git a/src/map/guild.c b/src/map/guild.c index 0d2f2cad1..5c3b2da4a 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -869,7 +869,6 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag, int guild_send_memberinfoshort(struct map_session_data *sd,int online)
{ // cleaned up [LuzZza]
-
struct guild *g;
nullpo_retr(0, sd);
@@ -887,18 +886,16 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) intif_guild_memberinfoshort(g->guild_id,
sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_);
- if(!online) //REMOVE sd pointer or you get a dangling pointer! [Skotlex]
- {
- int i = guild_getindex(g,sd->status.account_id,sd->status.char_id);
- if (i >= 0)
- g->member[i].sd = NULL;
+ if(!online){
+ int i=guild_getindex(g,sd->status.account_id,sd->status.char_id);
+ if(i>=0)
+ g->member[i].sd=NULL;
+ return 0;
}
if(sd->state.guild_sent)
return 0;
-// guild_check_conflict(sd); // Check if char belongs to more than one guild? Should be unneeded.
-
clif_guild_belonginfo(sd,g);
clif_guild_notice(sd,g);
diff --git a/src/map/mob.c b/src/map/mob.c index a0022ab2b..039a53fb1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1170,13 +1170,13 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) (mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW) ) { map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl, - view_range, md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS, md, &tbl); //[orn] + view_range, md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS, md, &tbl); if(!tbl && mode&MD_ANGRY && !md->state.aggressive) md->state.aggressive = 1; //Restore angry state when no targets are visible. } else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) { search_size = view_range<md->status.rhw.range ? view_range:md->status.rhw.range; map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl, - search_size, (md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS), md, &tbl); //[orn] + search_size, (md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS), md, &tbl); } if (tbl) diff --git a/src/map/party.c b/src/map/party.c index 271826610..2fbf363bd 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -469,9 +469,14 @@ int party_optionchanged(int party_id,int account_id,int exp,int item,int flag) if( (p=party_search(party_id))==NULL)
return 0;
- if(!(flag&0x01)) p->party.exp=exp;
- if(!(flag&0x10)) p->party.item=item;
- clif_party_option(p,sd,flag);
+ if(!(flag&0x01) && p->party.exp != exp) {
+ p->party.exp=exp;
+ clif_party_option(p,sd,flag); //This packet doesn't updates item info anymore...
+ }
+ if(!(flag&0x10) && p->party.item != item) {
+ p->party.item=item;
+ clif_party_main_info(p,-1);
+ }
return 0;
}
|