Permalink
Browse files

[8585] Fixed problem with guild_bank_rights not removed when guild ma…

…ster deleted rank. Problem reported by leak, Thx.

Signed-off-by: Triply <triply@getmangos.com>
  • Loading branch information...
1 parent b36fa7b commit bcfee54fb19689345459aef279c2aa9c7f3b008d @triply triply committed Oct 4, 2009
Showing with 6 additions and 1 deletion.
  1. +5 −0 src/game/Guild.cpp
  2. +1 −1 src/shared/revision_nr.h
View
@@ -647,6 +647,7 @@ void Guild::DelRank()
// delete lowest guild_rank
uint32 rank = GetLowestRank();
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE rid>='%u' AND guildid='%u'", rank, m_Id);
+ CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE rid>='%u' AND guildid='%u'", rank, m_Id);
m_Ranks.pop_back();
}
@@ -1411,7 +1412,11 @@ void Guild::SetBankRightsAndSlots(uint32 rankId, uint8 TabId, uint32 right, uint
if (rankId >= m_Ranks.size() ||
TabId >= GUILD_BANK_MAX_TABS ||
TabId >= m_PurchasedTabs)
+ {
+ //TODO remove next line, It is there just to repair existing bug in deleting guild rank
+ CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid='%u' AND rid='%u' AND TabId='%u'", m_Id, rankId, TabId);
return;
+ }
if (rankId == GR_GUILDMASTER)
{
View
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "8584"
+ #define REVISION_NR "8585"
#endif // __REVISION_NR_H__

0 comments on commit bcfee54

Please sign in to comment.