diff options
author | shennetsind <ind@henn.et> | 2013-05-15 21:56:21 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-15 21:56:21 -0300 |
commit | c7f3f6c2ceae862866a019d0a438d8f965b042c2 (patch) | |
tree | 1da2a986123b23a05c8722ccc68a949473d84fb9 /src/map/pc.c | |
parent | c811ddb181a15eae8a6d01a6956ae7c654f424b2 (diff) | |
download | hercules-c7f3f6c2ceae862866a019d0a438d8f965b042c2.tar.gz hercules-c7f3f6c2ceae862866a019d0a438d8f965b042c2.tar.bz2 hercules-c7f3f6c2ceae862866a019d0a438d8f965b042c2.tar.xz hercules-c7f3f6c2ceae862866a019d0a438d8f965b042c2.zip |
Hercules Renewal Phase One: guild.c started
http://hercules.ws/board/topic/237-hercules-renewal/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 87cb52895..49828071c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -34,7 +34,7 @@ #include "npc.h" // fake_nd #include "pet.h" // pet_unlocktarget() #include "party.h" // party_search() -#include "guild.h" // guild_search(), guild_request_info() +#include "guild.h" // guild->search(), guild_request_info() #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data @@ -1207,7 +1207,7 @@ int pc_reg_received(struct map_session_data *sd) if (sd->status.party_id) party_member_joined(sd); if (sd->status.guild_id) - guild_member_joined(sd); + guild->member_joined(sd); // pet if (sd->status.pet_id > 0) @@ -4086,7 +4086,8 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) { - clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474)); + clif->msgtable(sd->fd,664); + //clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474)); return 0; // You cannot use this item while sitting. } @@ -4749,7 +4750,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y if (battle_config.clear_unit_onwarp&BL_PC) skill->clear_unitgroup(&sd->bl); party_send_dot_remove(sd); //minimap dot fix [Kevin] - guild_send_dot_remove(sd); + guild->send_dot_remove(sd); bg_send_dot_remove(sd); if (sd->regen.state.gc) sd->regen.state.gc = 0; @@ -4824,7 +4825,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y if( sd->status.guild_id > 0 && map[m].flag.gvg_castle ) { // Increased guild castle regen [Valaris] - struct guild_castle *gc = guild_mapindex2gc(sd->mapindex); + struct guild_castle *gc = guild->mapindex2gc(sd->mapindex); if(gc && gc->guild_id == sd->status.guild_id) sd->regen.state.gc = 1; } @@ -4948,7 +4949,7 @@ int pc_checkskill(struct map_session_data *sd,uint16 skill_id) { struct guild *g; if( sd->status.guild_id>0 && (g=sd->guild)!=NULL) - return guild_checkskill(g,skill_id); + return guild->checkskill(g,skill_id); return 0; } else if(!(index = skill->get_index(skill_id)) || index >= ARRAYLENGTH(sd->status.skill) ) { ShowError("pc_checkskill: Invalid skill id %d (char_id=%d).\n", skill_id, sd->status.char_id); @@ -4970,7 +4971,7 @@ int pc_checkskill2(struct map_session_data *sd,uint16 index) { struct guild *g; if( sd->status.guild_id>0 && (g=sd->guild)!=NULL) - return guild_checkskill(g,skill_db[index].nameid); + return guild->checkskill(g,skill_db[index].nameid); return 0; } if(sd->status.skill[index].id == skill_db[index].nameid) @@ -5756,7 +5757,7 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int return 0; // no exp on pvp maps if(sd->status.guild_id>0) - base_exp-=guild_payexp(sd,base_exp); + base_exp-=guild->payexp(sd,base_exp); if(src) pc_calcexp(sd, &base_exp, &job_exp, src); @@ -6053,7 +6054,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) { nullpo_ret(sd); if( skill_id >= GD_SKILLBASE && skill_id < GD_SKILLBASE+MAX_GUILDSKILL ) { - guild_skillup(sd, skill_id); + guild->skillup(sd, skill_id); return 0; } @@ -6889,10 +6890,10 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) { pc_setinvincibletimer(sd, battle_config.pc_invincible_time); if( sd->state.gmaster_flag ) { - guild_guildaura_refresh(sd,GD_LEADERSHIP,guild_checkskill(sd->state.gmaster_flag,GD_LEADERSHIP)); - guild_guildaura_refresh(sd,GD_GLORYWOUNDS,guild_checkskill(sd->state.gmaster_flag,GD_GLORYWOUNDS)); - guild_guildaura_refresh(sd,GD_SOULCOLD,guild_checkskill(sd->state.gmaster_flag,GD_SOULCOLD)); - guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->state.gmaster_flag,GD_HAWKEYES)); + guild->aura_refresh(sd,GD_LEADERSHIP,guild->checkskill(sd->state.gmaster_flag,GD_LEADERSHIP)); + guild->aura_refresh(sd,GD_GLORYWOUNDS,guild->checkskill(sd->state.gmaster_flag,GD_GLORYWOUNDS)); + guild->aura_refresh(sd,GD_SOULCOLD,guild->checkskill(sd->state.gmaster_flag,GD_SOULCOLD)); + guild->aura_refresh(sd,GD_HAWKEYES,guild->checkskill(sd->state.gmaster_flag,GD_HAWKEYES)); } } // script |