mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 09:26:36 +00:00
-
This commit is contained in:
+25
-25
@@ -588,31 +588,31 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
/* Save Character Task */
|
||||
SaveTaskState();
|
||||
|
||||
if (iCommitNow <= 1) {
|
||||
// char* query = 0;
|
||||
// uint32_breakdown workpt;
|
||||
// workpt.b4() = DBA_b4_Entity;
|
||||
// workpt.w2_3() = GetID();
|
||||
// workpt.b1() = DBA_b1_Entity_Client_Save;
|
||||
// DBAsyncWork* dbaw = new DBAsyncWork(&database, &MTdbafq, workpt, DBAsync::Write, 0xFFFFFFFF);
|
||||
// dbaw->AddQuery(iCommitNow == 0 ? true : false, &query, database.SetPlayerProfile_MQ(&query, account_id, character_id, &m_pp, &m_inv, &m_epp, 0, 0, MaxXTargets), false);
|
||||
// if (iCommitNow == 0){
|
||||
// pQueuedSaveWorkID = dbasync->AddWork(&dbaw, 2500);
|
||||
// }
|
||||
// else {
|
||||
// dbasync->AddWork(&dbaw, 0);
|
||||
// SaveBackup();
|
||||
// }
|
||||
// safe_delete_array(query);
|
||||
// return true;
|
||||
}
|
||||
else if (database.SetPlayerProfile(account_id, character_id, &m_pp, &m_inv, &m_epp, 0, 0, MaxXTargets)) {
|
||||
SaveBackup();
|
||||
}
|
||||
else {
|
||||
std::cerr << "Failed to update player profile" << std::endl;
|
||||
return false;
|
||||
}
|
||||
// if (iCommitNow <= 1) {
|
||||
// // char* query = 0;
|
||||
// // uint32_breakdown workpt;
|
||||
// // workpt.b4() = DBA_b4_Entity;
|
||||
// // workpt.w2_3() = GetID();
|
||||
// // workpt.b1() = DBA_b1_Entity_Client_Save;
|
||||
// // DBAsyncWork* dbaw = new DBAsyncWork(&database, &MTdbafq, workpt, DBAsync::Write, 0xFFFFFFFF);
|
||||
// // dbaw->AddQuery(iCommitNow == 0 ? true : false, &query, database.SetPlayerProfile_MQ(&query, account_id, character_id, &m_pp, &m_inv, &m_epp, 0, 0, MaxXTargets), false);
|
||||
// // if (iCommitNow == 0){
|
||||
// // pQueuedSaveWorkID = dbasync->AddWork(&dbaw, 2500);
|
||||
// // }
|
||||
// // else {
|
||||
// // dbasync->AddWork(&dbaw, 0);
|
||||
// // SaveBackup();
|
||||
// // }
|
||||
// // safe_delete_array(query);
|
||||
// // return true;
|
||||
// }
|
||||
// else if (database.SetPlayerProfile(account_id, character_id, &m_pp, &m_inv, &m_epp, 0, 0, MaxXTargets)) {
|
||||
// SaveBackup();
|
||||
// }
|
||||
// else {
|
||||
// std::cerr << "Failed to update player profile" << std::endl;
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/* Save Character Data */
|
||||
database.SaveCharacterData(this->CharacterID(), this->AccountID(), &m_pp);
|
||||
|
||||
@@ -1931,6 +1931,7 @@ void Mob::SetZone(uint32 zone_id, uint32 instance_id)
|
||||
{
|
||||
CastToClient()->GetPP().zone_id = zone_id;
|
||||
CastToClient()->GetPP().zoneInstance = instance_id;
|
||||
CastToClient()->Save();
|
||||
}
|
||||
Save();
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ void WorldServer::Process() {
|
||||
|
||||
entity->CastToMob()->SetZone(ztz->requested_zone_id, ztz->requested_instance_id);
|
||||
|
||||
if(ztz->ignorerestrictions == 3)
|
||||
if(ztz->ignorerestrictions == 3)
|
||||
entity->CastToClient()->GoToSafeCoords(ztz->requested_zone_id, ztz->requested_instance_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
#endif
|
||||
ZoneChange_Struct* zc=(ZoneChange_Struct*)app->pBuffer;
|
||||
|
||||
printf("INCOMING CLIENT\n\n");
|
||||
printf("%s\n", zc->char_name);
|
||||
printf("%u\n", zc->zoneID);
|
||||
|
||||
uint16 target_zone_id = 0;
|
||||
uint16 target_instance_id = zc->instanceID;
|
||||
ZonePoint* zone_point = nullptr;
|
||||
@@ -368,6 +372,8 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
outapp->priority = 6;
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
printf("INTERZONE PROCESS\n");
|
||||
|
||||
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
||||
} else {
|
||||
// vesuvias - zoneing to another zone so we need to the let the world server
|
||||
@@ -384,6 +390,17 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
strcpy(ztz->name, GetName());
|
||||
ztz->guild_id = GuildID();
|
||||
worldserver.SendPacket(pack);
|
||||
|
||||
printf("ZONING REQUEST TO WORLD\n");
|
||||
printf("ztz->response %u \n", ztz->response);
|
||||
printf("ztz->current_zone_id %u \n", ztz->current_zone_id);
|
||||
printf("ztz->current_instance_id %u \n", ztz->current_instance_id);
|
||||
printf("ztz->requested_zone_id %u \n", ztz->requested_zone_id);
|
||||
printf("ztz->requested_instance_id %u \n", ztz->requested_instance_id);
|
||||
printf("ztz->admin %u \n", ztz->admin);
|
||||
printf("ztz->ignorerestrictions %u \n", ztz->ignorerestrictions);
|
||||
printf("ztz->guild_id %u \n", ztz->guild_id);
|
||||
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
@@ -551,6 +568,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
|
||||
if(ReadyToZone) {
|
||||
zone_mode = zm;
|
||||
printf("\n\n ZONE MODE %u \n\n", zm);
|
||||
if(zm == ZoneToBindPoint) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ZonePlayerToBind, sizeof(ZonePlayerToBind_Struct) + iZoneNameLength);
|
||||
ZonePlayerToBind_Struct* gmg = (ZonePlayerToBind_Struct*) outapp->pBuffer;
|
||||
@@ -584,6 +602,10 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
gmg->instance_id = instance_id;
|
||||
gmg->type = 0x01; //an observed value, not sure of meaning
|
||||
|
||||
printf("gmg->zone_id %u \n", gmg->zone_id);
|
||||
printf("gmg->x %u \n", gmg->x);
|
||||
printf("gmg->y %u \n", gmg->y);
|
||||
|
||||
outapp->priority = 6;
|
||||
FastQueuePacket(&outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
Reference in New Issue
Block a user