mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
-
This commit is contained in:
parent
e0db3c0b60
commit
0a9222e1ee
@ -92,7 +92,7 @@ uint32 SharedDatabase::SetPlayerProfile_MQ(char** query, uint32 account_id, uint
|
||||
if (strlen(pp->name) == 0) // Sanity check in case pp never loaded
|
||||
return false;
|
||||
|
||||
end += sprintf(end, "UPDATE character_ SET timelaston=unix_timestamp(now()),name=\'%s\', zonename=\'%s\', zoneid=%u, instanceid=%u, x = %f, y = %f, z = %f, ", pp->name, "halas", 29, current_instance, pp->x, pp->y, pp->z);
|
||||
end += sprintf(end, "UPDATE character_ SET timelaston=unix_timestamp(now()),name=\'%s\', zonename=\'%s\', zoneid=%u, instanceid=%u, x = %f, y = %f, z = %f, ", pp->name, GetZoneName(current_zone), current_zone, current_instance, pp->x, pp->y, pp->z);
|
||||
// end += DoEscapeString(end, (char*)pp, sizeof(PlayerProfile_Struct));
|
||||
end += sprintf(end, " extprofile=\'");
|
||||
end += DoEscapeString(end, (char*)ext, sizeof(ExtendedProfile_Struct));
|
||||
|
||||
@ -675,6 +675,9 @@ bool ZoneServer::Process() {
|
||||
zlog(WORLD__ZONE,"ZoneToZone request for %s current zone %d req zone %d\n",
|
||||
ztz->name, ztz->current_zone_id, ztz->requested_zone_id);
|
||||
|
||||
printf("\n\n ZoneToZone request for %s current zone %d req zone %d\n\n",
|
||||
ztz->name, ztz->current_zone_id, ztz->requested_zone_id);
|
||||
|
||||
if(GetZoneID() == ztz->current_zone_id && GetInstanceID() == ztz->current_instance_id) // this is a request from the egress zone
|
||||
{
|
||||
zlog(WORLD__ZONE,"Processing ZTZ for egress from zone for client %s\n", ztz->name);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user