Remove guild bank methods

This commit is contained in:
Rochet2
2017-07-19 18:12:31 +03:00
parent bf10f4f3a4
commit 48313dd0db
2 changed files with 0 additions and 47 deletions

View File

@@ -293,48 +293,5 @@ namespace LuaGuild
#endif #endif
return 0; return 0;
} }
#ifndef CLASSIC
// Move to Player methods
/**
* Windraws money from the [Guild] bank
*
* @param [Player] player
* @param uint32 money
*/
int WithdrawBankMoney(lua_State* L, Guild* guild)
{
Player* player = Eluna::CHECKOBJ<Player>(L, 2);
uint32 money = Eluna::CHECKVAL<uint32>(L, 3);
#ifndef TRINITY
if (guild->GetGuildBankMoney() < money)
return 0;
guild->SetBankMoney(guild->GetGuildBankMoney() - money);
#else
guild->HandleMemberWithdrawMoney(player->GetSession(), money);
#endif
return 0;
}
// Move to Player methods
/**
* Deposits money to the [Guild] bank
*
* @param [Player] player
* @param uint32 money
*/
int DepositBankMoney(lua_State* L, Guild* guild)
{
Player* player = Eluna::CHECKOBJ<Player>(L, 2);
uint32 money = Eluna::CHECKVAL<uint32>(L, 3);
#ifndef TRINITY
guild->SetBankMoney(guild->GetGuildBankMoney() + money);
#else
guild->HandleMemberDepositMoney(player->GetSession(), money);
#endif
return 0;
}
#endif
}; };
#endif #endif

View File

@@ -1093,10 +1093,6 @@ ElunaRegister<Guild> GuildMethods[] =
{ "Disband", &LuaGuild::Disband }, { "Disband", &LuaGuild::Disband },
{ "AddMember", &LuaGuild::AddMember }, { "AddMember", &LuaGuild::AddMember },
{ "DeleteMember", &LuaGuild::DeleteMember }, { "DeleteMember", &LuaGuild::DeleteMember },
#ifndef CLASSIC
{ "DepositBankMoney", &LuaGuild::DepositBankMoney },
{ "WithdrawBankMoney", &LuaGuild::WithdrawBankMoney },
#endif
{ NULL, NULL } { NULL, NULL }
}; };