Skip to content

Commit

Permalink
Fix typo in enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Aug 31, 2024
1 parent f23a96c commit d48b22c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/game/Achievements/AchievementMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
break;
}
case ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL:
change = GetPlayer()->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
change = GetPlayer()->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS);
progressType = PROGRESS_HIGHEST;
break;
case ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS:
Expand Down
2 changes: 1 addition & 1 deletion src/game/Chat/Level3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5149,7 +5149,7 @@ bool ChatHandler::HandleResetHonorCommand(char* args)

target->SetCurrencyCount(CURRENCY_HONOR_POINTS, 0);
target->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0);
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/MiscHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
data << uint16(player->GetUInt16Value(PLAYER_FIELD_KILLS, 1)); // yesterday kills
data << uint16(player->GetUInt16Value(PLAYER_FIELD_KILLS, 0)); // today kills
data.WriteGuidBytes<2, 0, 6, 3, 4, 1, 5>(player->GetObjectGuid());
data << uint32(player->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS));
data << uint32(player->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS));
data.WriteGuidBytes<7>(player->GetObjectGuid());

SendPacket(data);
Expand Down
8 changes: 4 additions & 4 deletions src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);

SetUInt32Value(PLAYER_FIELD_KILLS, 0);
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0);
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);

// set starting level
uint32 start_level = getClass() != CLASS_DEATH_KNIGHT
Expand Down Expand Up @@ -6967,7 +6967,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, float honor)
// count the number of playerkills in one day
ApplyModUInt32Value(PLAYER_FIELD_KILLS, 1, true);
// and those in a lifetime
ApplyModUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 1, true);
ApplyModUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 1, true);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS, pVictim->getClass());
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HK_RACE, pVictim->getRace());
Expand Down Expand Up @@ -15441,7 +15441,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
SetArenaTeamInfoField(arena_slot, ArenaTeamInfoType(j), 0);
}

SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, fields[40].GetUInt32());
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, fields[40].GetUInt32());
SetUInt16Value(PLAYER_FIELD_KILLS, 0, fields[41].GetUInt16()); // today
SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[42].GetUInt16()); // yesterday

Expand Down Expand Up @@ -17241,7 +17241,7 @@ void Player::SaveToDB()
ss << m_taxi.SaveTaxiDestinationsToString(); // string
uberInsert.addString(ss);

uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS));
uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS));

uberInsert.addUInt16(GetUInt16Value(PLAYER_FIELD_KILLS, 0));

Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/UpdateFields.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ enum EPlayerFields
PLAYER_FIELD_BUYBACK_PRICE_1 = UNIT_END + 0x43C,
PLAYER_FIELD_BUYBACK_TIMESTAMP_1 = UNIT_END + 0x448,
PLAYER_FIELD_KILLS = UNIT_END + 0x454,
PLAYER_FIELD_LIFETIME_HONORBALE_KILLS = UNIT_END + 0x455,
PLAYER_FIELD_LIFETIME_HONORABLE_KILLS = UNIT_END + 0x455,
PLAYER_FIELD_BYTES2 = UNIT_END + 0x456,
PLAYER_FIELD_WATCHED_FACTION_INDEX = UNIT_END + 0x457,
PLAYER_FIELD_COMBAT_RATING_1 = UNIT_END + 0x458,
Expand Down

0 comments on commit d48b22c

Please sign in to comment.