summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-18 00:02:34 -0300
committershennetsind <ind@henn.et>2013-07-18 00:02:34 -0300
commit586c0f7983f81e97ca70c57712e25d4d51453d6b (patch)
tree8347a69204d7b02bd258da68b797ea6693b36938 /src/map/pc.c
parent857e4fb58b26ea088c0ad92ec5b1ac9423ec1e65 (diff)
downloadhercules-586c0f7983f81e97ca70c57712e25d4d51453d6b.tar.gz
hercules-586c0f7983f81e97ca70c57712e25d4d51453d6b.tar.bz2
hercules-586c0f7983f81e97ca70c57712e25d4d51453d6b.tar.xz
hercules-586c0f7983f81e97ca70c57712e25d4d51453d6b.zip
Fixed guild aura not going away on guild-break/expell
Also modified sd->state.gmaster_flag from struct to a 'unsigned int : 1;' flag as sd->guild already stores the pointer and was thus a duplicate. Special Thanks to Haru, Xgear Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 84cfe7eb3..5a8b77cd3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6987,10 +6987,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->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));
+ guild->aura_refresh(sd,GD_LEADERSHIP,guild->checkskill(sd->guild,GD_LEADERSHIP));
+ guild->aura_refresh(sd,GD_GLORYWOUNDS,guild->checkskill(sd->guild,GD_GLORYWOUNDS));
+ guild->aura_refresh(sd,GD_SOULCOLD,guild->checkskill(sd->guild,GD_SOULCOLD));
+ guild->aura_refresh(sd,GD_HAWKEYES,guild->checkskill(sd->guild,GD_HAWKEYES));
}
}
// script
@@ -8933,12 +8933,12 @@ int pc_checkitem(struct map_session_data *sd)
}
if (sd->state.gmaster_flag) {
- struct guild_storage *guild_storage = gstorage->id2storage2(sd->state.gmaster_flag->guild_id);
+ struct guild_storage *guild_storage = gstorage->id2storage2(sd->guild->guild_id);
if (guild_storage) {
for( i = 0; i < MAX_GUILD_STORAGE; i++ ) {
id = guild_storage->items[i].nameid;
if( id && !itemdb_available(id) ) {
- ShowWarning("Removed invalid/disabled item id %d from guild storage (amount=%d, char_id=%d, guild_id=%d).\n", id, guild_storage->items[i].amount, sd->status.char_id, sd->state.gmaster_flag->guild_id);
+ ShowWarning("Removed invalid/disabled item id %d from guild storage (amount=%d, char_id=%d, guild_id=%d).\n", id, guild_storage->items[i].amount, sd->status.char_id, sd->guild->guild_id);
gstorage->delitem(sd, guild_storage, i, guild_storage->items[i].amount);
gstorage->close(sd); // force closing
}