Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'

Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
	intensive or metric based logging to a remote server process that could exist on another server entirely
Implemented Player Event Logging Types (Go to table `qs_player_events`):
		1 = Player_Log_Quest,
		2 = Player_Log_Zoning,
		3 = Player_Log_Deaths,
		4 = Player_Log_Connect_State,
		5 = Player_Log_Levels,
		6 = Player_Log_Keyring_Addition,
		7 = Player_Log_QGlobal_Update,
		8 = Player_Log_Task_Updates,
		9 = Player_Log_AA_Purchases,
		10 = Player_Log_Trade_Skill_Events,
		11 = Player_Log_Issued_Commands,
		12 = Player_Log_Money_Transactions,
		13 = Player_Log_Alternate_Currency_Transactions,
		- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
Changed all QS Error related logging to 'QUERYSERV__ERROR'
(Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
Implemented Perl Quest objects (LUA still needed to be exported):
	- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
	- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
Added MySQL Tables:
	- `qs_player_aa_rate_hourly`
	- `qs_player_events`
	- Source table structures from:
		- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
		To get the complete QueryServ schema, source from here:
		- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
Added rules for each logging type, source rules here with them enabled by default:
	- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
Spawn related logging cleanup
General code cleanup
Added queryserv.cpp and queryserv.h with QueryServ class
This commit is contained in:
akkadius
2014-08-23 23:59:20 -05:00
parent 16d47a2c47
commit 7f89191ffc
40 changed files with 1316 additions and 779 deletions
+12 -6
View File
@@ -25,7 +25,9 @@
#include "../common/string_util.h"
#include "string_ids.h"
#include "quest_parser_collection.h"
#include "queryserv.h"
extern QueryServ* QServ;
extern WorldServer worldserver;
extern Zone* zone;
@@ -147,7 +149,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
}
}
//make sure its a valid zone.
/* Check for Valid Zone */
const char *target_zone_name = database.GetZoneName(target_zone_id);
if(target_zone_name == nullptr) {
//invalid zone...
@@ -157,7 +159,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
return;
}
//load up the safe coords, restrictions, and verify the zone name
/* Load up the Safe Coordinates, restrictions and verify the zone name*/
float safe_x, safe_y, safe_z;
int16 minstatus = 0;
uint8 minlevel = 0;
@@ -327,15 +329,19 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
SendLogoutPackets();
//dont clear aggro until the zone is successful
/* QS: PlayerLogZone */
if (RuleB(QueryServ, PlayerLogZone)){
std::string event_desc = StringFormat("Zoning :: zoneid:%u instid:%u x:%4.2f y:%4.2f z:%4.2f h:%4.2f zonemode:%d from zoneid:%u instid:%i", zone_id, instance_id, dest_x, dest_y, dest_z, dest_h, zone_mode, this->GetZoneID(), this->GetInstanceID());
QServ->PlayerLogEvent(Player_Log_Zoning, this->CharacterID(), event_desc);
}
/* Dont clear aggro until the zone is successful */
entity_list.RemoveFromHateLists(this);
if(this->GetPet())
entity_list.RemoveFromHateLists(this->GetPet());
LogFile->write(EQEMuLog::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f",
m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id,
dest_x, dest_y, dest_z);
LogFile->write(EQEMuLog::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
//set the player's coordinates in the new zone so they have them
//when they zone into it