Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2004, 02:28 PM
monalin crusader
Hill Giant
 
Join Date: May 2004
Posts: 238
Default

heres /guildpeace

not sure if this works yet i'll have to test it. Doing so soon.

line 808 in database.cpp

Code:
bool Database::SetGuildPeace(int32 guildid, int32 guildid2)
{
	char errbuf[MYSQL_ERRMSG_SIZE];
    char *query = 0;

	if (!RunQuery(query, MakeAnyLenString(&query, "DELETE FROM guildwar WHERE guildid1=%i, guildid2=%i;", guildid, guildid2), errbuf)) 
	{
		cerr << "Error in SetGuildPeace Query '" << query << "' " << errbuf << endl;
		safe_delete_array(query);

		return false;
	}
	else 
	{
	safe_delete_array(query);
	return true;
	}
}
Line 181 in database.h

Code:
	bool	SetGuildPeace(int32 guildid, int32 guildid2);
around line 1857 in client_process.cpp

change

Code:
		case OP_GuildPeace: { break; }
to

Code:
		case OP_GuildPeace: {

					GuildCommand_Struct* gc = (GuildCommand_Struct*) app->pBuffer;
					Client* client=entity_list.GetClientByName(gc->othername);

					if ((GuildRank() == 2) && (client->GuildRank() == 2)) // If both clients are guild leaders
					{

						if(!database.CheckGuildWar(GuildDBID(), client->GuildDBID()))
							Message(0, "Error: You are not at war with this guild!");
						else if(!database.SetGuildPeace(GuildDBID(), client->GuildDBID()))
							Message(0, "There was an error writing to db!");
						else
							Message(0, "You are now at peace.");

					}	else if (client->GuildRank() != 2)
						Message(0, "Error: Your target is not a guild leader!");
					else if (client->GuildDBID == 0)
						Message(0, "Error: Your target is not in a guild!");
					else if (GuildRank() !=2)
						Message(0, "Error: You arent the guild leader!");
					else if (!worldserver.Connected())
						Message(0, "Error: World server disconnected");
					else if (client->GuildDBID() == GuildDBID())
						Message(0,"You are in the same guild, what do you think you are doing?");
					else if (guilddbid == 0)
						Message(0, "Error: You arent in a guild!");
					break;
				}
__________________
Ascending Dawn Server Op
Coder/Quester/Mysql
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:43 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3