Project 1999

Go Back   Project 1999 > Red Community > Red Server Chat

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 05-17-2013, 10:46 AM
GODPARTICLE GODPARTICLE is offline
Banned


Join Date: Apr 2013
Posts: 85
Default

You want even more overhead? How about a write to innoDB

Code:
	database.LogPvPKill(zone->GetShortName(), pvp_points,
						killer->CharacterID(), killer->GetName(), guild_mgr.GetGuildName(killer->GuildID()), killer->GuildID(), 
						killer->GetLevel(), killer->GetRace(), killer->GetClass(), long2ip(killer->GetIP()).c_str(),
						
						this->CharacterID(), this->GetName(), guild_mgr.GetGuildName(this->GuildID()), this->GuildID(), 
						this->GetLevel(), this->GetRace(), this->GetClass(), long2ip(this->GetIP()).c_str()
						
	);
Or an update

Code:
	this->UpdatePVPStats(PVPEncounterDeath, pvp_points); // you lose! next we'll divide your points between the group.
	// we don't need to SendPVPStats() here, they'll get them when they zone to their bind
Or an update for the entire group?

Code:
	if (killer->IsGrouped())
	{
		Group *pvp_group = entity_list.GetGroupByClient(killer);
		if (pvp_group != NULL)
		{
			pvp_points = pvp_points / pvp_group->GroupCount();  // divide the points, TODO: fix it to not divide by people not in zone

			for (int i = 0; i < 6; i++)
			{
				if 
				(	pvp_group->members[i] != NULL &&
					// we're only awarding "assists" for groupies in the same zone
					pvp_group->members[i]->CastToClient()->CharacterID() != killer->CharacterID() &&
					pvp_group->members[i]->CastToClient()->GetZoneID() == zone->GetZoneID()
				)
				{
					pvp_group->members[i]->CastToClient()->UpdatePVPStats(PVPEncounterAssist, pvp_points);
					pvp_group->members[i]->CastToClient()->SendPVPStats();
				}
			}
		}
	}

	killer->UpdatePVPStats(PVPEncounterKill, pvp_points); // do this here for code flow logic
	killer->SendPVPStats();

Somehow that read from a myISAM table ain't looking like that big a deal anymore?
 


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 02:12 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.