mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-18 03:22:27 +00:00
[Cleanup] Cleanup RandomizeFeatures() (#3958)
# Notes - Uses pre-defined constants and cleanup code. - Move `IsPlayerRace()` check so it's an early return instead of using an `else`.
This commit is contained in:
parent
ef635cb257
commit
b61649a2a0
36
zone/mob.cpp
36
zone/mob.cpp
@ -3663,25 +3663,23 @@ void Mob::SetFaceAppearance(const FaceChange_Struct& face, bool skip_sender)
|
||||
|
||||
bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
|
||||
{
|
||||
if (IsPlayerRace(GetRace())) {
|
||||
uint8 current_gender = GetGender();
|
||||
uint8 new_texture = 0xFF;
|
||||
uint8 new_helm_texture = 0xFF;
|
||||
uint8 new_hair_color = 0xFF;
|
||||
uint8 new_beard_color = 0xFF;
|
||||
uint8 new_eye_color_one = 0xFF;
|
||||
uint8 new_eye_color_two = 0xFF;
|
||||
uint8 new_hair_style = 0xFF;
|
||||
uint8 new_luclin_face = 0xFF;
|
||||
uint8 new_beard = 0xFF;
|
||||
uint32 new_drakkin_heritage = 0xFFFFFFFF;
|
||||
uint32 new_drakkin_tattoo = 0xFFFFFFFF;
|
||||
uint32 new_drakkin_details = 0xFFFFFFFF;
|
||||
if (!IsPlayerRace(GetRace())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set some common feature settings
|
||||
new_eye_color_one = zone->random.Int(0, 9);
|
||||
new_eye_color_two = zone->random.Int(0, 9);
|
||||
new_luclin_face = zone->random.Int(0, 7);
|
||||
uint8 current_gender = GetGender();
|
||||
uint8 new_texture = UINT8_MAX;
|
||||
uint8 new_helm_texture = UINT8_MAX;
|
||||
uint8 new_hair_color = UINT8_MAX;
|
||||
uint8 new_beard_color = UINT8_MAX;
|
||||
uint8 new_eye_color_one = zone->random.Int(0, 9);
|
||||
uint8 new_eye_color_two = zone->random.Int(0, 9);
|
||||
uint8 new_hair_style = UINT8_MAX;
|
||||
uint8 new_luclin_face = zone->random.Int(0, 7);
|
||||
uint8 new_beard = UINT8_MAX;
|
||||
uint32 new_drakkin_heritage = UINT32_MAX;
|
||||
uint32 new_drakkin_tattoo = UINT32_MAX;
|
||||
uint32 new_drakkin_details = UINT32_MAX;
|
||||
|
||||
// Adjust all settings based on the min and max for each feature of each race and gender
|
||||
switch (GetRace()) {
|
||||
@ -3886,8 +3884,6 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16 Mob::GetFactionRace() {
|
||||
uint16 current_race = GetRace();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user