mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Rewrite VarCache_Struct
Basically just remove manual memory management
This commit is contained in:
+12
-8
@@ -1406,8 +1406,9 @@ bool GuildApproval::ProcessApproval()
|
||||
|
||||
GuildApproval::GuildApproval(const char* guildname, Client* owner,uint32 id)
|
||||
{
|
||||
database.GetVariable("GuildCreation", founders, 3);
|
||||
uint8 tmp = atoi(founders);
|
||||
std::string founders;
|
||||
database.GetVariable("GuildCreation", founders);
|
||||
uint8 tmp = atoi(founders.c_str());
|
||||
deletion_timer = new Timer(1800000);
|
||||
strcpy(guild,guildname);
|
||||
this->owner = owner;
|
||||
@@ -1425,8 +1426,9 @@ GuildApproval::~GuildApproval()
|
||||
|
||||
bool GuildApproval::AddMemberApproval(Client* addition)
|
||||
{
|
||||
database.GetVariable("GuildCreation", founders, 3);
|
||||
uint8 tmp = atoi(founders);
|
||||
std::string founders;
|
||||
database.GetVariable("GuildCreation", founders);
|
||||
uint8 tmp = atoi(founders.c_str());
|
||||
for(int i=0;i<tmp;i++)
|
||||
{
|
||||
if(members[i] && members[i] == addition)
|
||||
@@ -1455,8 +1457,9 @@ bool GuildApproval::AddMemberApproval(Client* addition)
|
||||
|
||||
void GuildApproval::ApprovedMembers(Client* requestee)
|
||||
{
|
||||
database.GetVariable("GuildCreation", founders, 3);
|
||||
uint8 tmp = atoi(founders);
|
||||
std::string founders;
|
||||
database.GetVariable("GuildCreation", founders);
|
||||
uint8 tmp = atoi(founders.c_str());
|
||||
for(int i=0;i<tmp;i++)
|
||||
{
|
||||
if(members[i])
|
||||
@@ -1471,8 +1474,9 @@ void GuildApproval::GuildApproved()
|
||||
|
||||
if(!owner)
|
||||
return;
|
||||
database.GetVariable("GuildCreation", founders, 3);
|
||||
uint8 tmp = atoi(founders);
|
||||
std::string founders;
|
||||
database.GetVariable("GuildCreation", founders);
|
||||
uint8 tmp = atoi(founders.c_str());
|
||||
uint32 tmpeq = guild_mgr.CreateGuild(guild, owner->CharacterID());
|
||||
guild_mgr.SetGuild(owner->CharacterID(),tmpeq,2);
|
||||
owner->SendAppearancePacket(AT_GuildID,true,false);
|
||||
|
||||
Reference in New Issue
Block a user