mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Fix for issue #270, fix for temp merchant lists not loading correctly, fix for ah redundant getadventurestats code.
This commit is contained in:
+2
-1
@@ -1287,7 +1287,7 @@ bool Client::UpdateLDoNPoints(int32 points, uint32 theme)
|
||||
m_pp.ldon_points_ruj += rujpts;
|
||||
m_pp.ldon_points_tak += takpts;
|
||||
points-=splitpts;
|
||||
// if anything left, recursively loop thru again
|
||||
// if anything left, recursively loop thru again
|
||||
if (splitpts !=0)
|
||||
UpdateLDoNPoints(splitpts,0);
|
||||
break;
|
||||
@@ -1344,6 +1344,7 @@ bool Client::UpdateLDoNPoints(int32 points, uint32 theme)
|
||||
}
|
||||
}
|
||||
m_pp.ldon_points_available += points;
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_AdventurePointsUpdate, sizeof(AdventurePoints_Update_Struct));
|
||||
AdventurePoints_Update_Struct* apus = (AdventurePoints_Update_Struct*)outapp->pBuffer;
|
||||
apus->ldon_available_points = m_pp.ldon_points_available;
|
||||
|
||||
+17
-5
@@ -1405,7 +1405,22 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
database.LoadCharacterLanguages(cid, &m_pp); /* Load Character Languages */
|
||||
database.LoadCharacterLeadershipAA(cid, &m_pp); /* Load Character Leadership AA's */
|
||||
database.LoadCharacterTribute(cid, &m_pp); /* Load CharacterTribute */
|
||||
database.LoadCharacterLDONStats(cid, &m_pp); /* Load Character LDON Stats */
|
||||
|
||||
/* Load AdventureStats */
|
||||
AdventureStats_Struct as;
|
||||
if(database.GetAdventureStats(cid, &as))
|
||||
{
|
||||
m_pp.ldon_wins_guk = as.success.guk;
|
||||
m_pp.ldon_wins_mir = as.success.mir;
|
||||
m_pp.ldon_wins_mmc = as.success.mmc;
|
||||
m_pp.ldon_wins_ruj = as.success.ruj;
|
||||
m_pp.ldon_wins_tak = as.success.tak;
|
||||
m_pp.ldon_losses_guk = as.failure.guk;
|
||||
m_pp.ldon_losses_mir = as.failure.mir;
|
||||
m_pp.ldon_losses_mmc = as.failure.mmc;
|
||||
m_pp.ldon_losses_ruj = as.failure.ruj;
|
||||
m_pp.ldon_losses_tak = as.failure.tak;
|
||||
}
|
||||
|
||||
/* Set item material tint */
|
||||
for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_END; i++)
|
||||
@@ -2489,11 +2504,8 @@ void Client::Handle_OP_AdventureStatsRequest(const EQApplicationPacket *app)
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_AdventureStatsReply, sizeof(AdventureStats_Struct));
|
||||
AdventureStats_Struct *as = (AdventureStats_Struct*)outapp->pBuffer;
|
||||
|
||||
if (database.GetAdventureStats(CharacterID(), as->success.guk, as->success.mir, as->success.mmc, as->success.ruj,
|
||||
as->success.tak, as->failure.guk, as->failure.mir, as->failure.mmc, as->failure.ruj, as->failure.tak))
|
||||
if (database.GetAdventureStats(CharacterID(), as))
|
||||
{
|
||||
as->failure.total = as->failure.guk + as->failure.mir + as->failure.mmc + as->failure.ruj + as->failure.tak;
|
||||
as->success.total = as->success.guk + as->success.mir + as->success.mmc + as->success.ruj + as->success.tak;
|
||||
m_pp.ldon_wins_guk = as->success.guk;
|
||||
m_pp.ldon_wins_mir = as->success.mir;
|
||||
m_pp.ldon_wins_mmc = as->success.mmc;
|
||||
|
||||
+1
-1
@@ -411,7 +411,7 @@ void Zone::LoadTempMerchantData() {
|
||||
"WHERE "
|
||||
"ml.npcid = se.npcid "
|
||||
"AND se.spawngroupid = s2.spawngroupid "
|
||||
"AND s2.zone = '%s' AND s2.version = %i"
|
||||
"AND s2.zone = '%s' AND s2.version = %i "
|
||||
"ORDER BY ml.slot ", GetShortName(), GetInstanceVersion());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
|
||||
@@ -1028,34 +1028,6 @@ bool ZoneDatabase::LoadCharacterLeadershipAA(uint32 character_id, PlayerProfile_
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadCharacterLDONStats(uint32 character_id, PlayerProfile_Struct* pp) {
|
||||
std::string query = StringFormat("SELECT `guk_wins`, `mir_wins`, `mmc_wins`, `ruj_wins`, `tak_wins`, `guk_losses`, "
|
||||
"`mir_losses`, `mmc_losses`, `ruj_losses`, `tak_losses` FROM `adventure_stats` WHERE player_id=%u", character_id);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
return false;
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
return false;
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
pp->ldon_wins_guk = atoi(row[0]);
|
||||
pp->ldon_wins_mir = atoi(row[1]);
|
||||
pp->ldon_wins_mmc = atoi(row[2]);
|
||||
pp->ldon_wins_ruj = atoi(row[3]);
|
||||
pp->ldon_wins_tak = atoi(row[4]);
|
||||
pp->ldon_losses_guk = atoi(row[5]);
|
||||
pp->ldon_losses_mir = atoi(row[6]);
|
||||
pp->ldon_losses_mmc = atoi(row[7]);
|
||||
pp->ldon_losses_ruj = atoi(row[8]);
|
||||
pp->ldon_losses_tak = atoi(row[9]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp){
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
|
||||
@@ -264,7 +264,6 @@ public:
|
||||
bool LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
bool LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
bool LoadCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
bool LoadCharacterLDONStats(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
|
||||
/* Character Data Saves */
|
||||
bool SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
|
||||
|
||||
Reference in New Issue
Block a user