Core/Game: Include cleanup

* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
This commit is contained in:
Shauren
2017-05-18 23:52:58 +02:00
parent 7445670314
commit c5d3dd90be
357 changed files with 4791 additions and 3886 deletions

View File

@@ -16,22 +16,24 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Guild.h"
#include "AccountMgr.h"
#include "Bag.h"
#include "CalendarMgr.h"
#include "CalendarPackets.h"
#include "Chat.h"
#include "ChatPackets.h"
#include "Config.h"
#include "DatabaseEnv.h"
#include "Guild.h"
#include "GuildFinderMgr.h"
#include "GuildMgr.h"
#include "GuildPackets.h"
#include "Language.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "ScriptMgr.h"
#include "SocialMgr.h"
#include "Opcodes.h"
#include "ChatPackets.h"
#include "CalendarPackets.h"
#define MAX_GUILD_BANK_TAB_TEXT_LEN 500
#define EMBLEM_PRICE 10 * GOLD
@@ -656,6 +658,16 @@ void Guild::Member::ResetValues(bool weekly /* = false*/)
}
}
Player* Guild::Member::FindPlayer() const
{
return ObjectAccessor::FindPlayer(m_guid);
}
Player* Guild::Member::FindConnectedPlayer() const
{
return ObjectAccessor::FindConnectedPlayer(m_guid);
}
// Get amount of money/slots left for today.
// If (tabId == GUILD_BANK_MAX_TABS) return money amount.
// Otherwise return remaining items amount for specified tab.
@@ -2761,6 +2773,13 @@ void Guild::SetBankTabText(uint8 tabId, std::string const& text)
}
}
void Guild::_DeleteMemberFromDB(ObjectGuid::LowType lowguid)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_MEMBER);
stmt->setUInt64(0, lowguid);
CharacterDatabase.Execute(stmt);
}
// Private methods
void Guild::_CreateLogHolders()
{