View Single Post
  #195  
Old 05-17-2013, 09:46 AM
Rogean Rogean is offline
¯\_(ツ)_/¯

Rogean's Avatar

Join Date: Oct 2009
Location: Massachusetts
Posts: 5,390
Default

Quote:
Originally Posted by GODPARTICLE [You must be logged in to view images. Log in or Register.]
Code:
	char phrase[255];
	database.GetRandPvPSaying(phrase);
	
	worldserver.SendEmoteMessage(0,0,0,15,
		"%s (%u %s) <%s> %s %s (%u %s) <%s>  in %s!",
			this->GetName(),this->GetLevel(),classes[this->GetClass()],guild_mgr.GetGuildName(this->GuildID()),
			phrase,
			killer->GetName(),killer->GetLevel(),classes[killer->GetClass()],guild_mgr.GetGuildName(killer->GuildID()),
			zone->GetLongName()
	);
database.GetRandPvPSaying(phrase); ? You're pulling an SQL Query every time you want to get a phrase? I almost didn't read past this horrible bit of inefficiency.

"%s (%u %s) <%s> %s %s (%u %s) <%s> in %s!"

Lack of guild causes unnecessary ") <> ". This is why I have %s%s%s, If there's no guild name, why add the extra support text around it. It looks cleaner.
You have an extra space before "in".

I did forget the zone name, I'll add that to mine.
__________________
Sean "Rogean" Norton
Project 1999 Co-Manager

Project 1999 Setup Guide