mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
Merge fixes, hopefully didn't break anything.
This commit is contained in:
+11
-12
@@ -1545,7 +1545,7 @@ void Mob::SendIllusionPacket(uint16 in_race, uint8 in_gender, uint8 in_texture,
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
safe_delete(outapp);
|
||||
mlog(CLIENT__SPELLS, "Illusion: Race = %i, Gender = %i, Texture = %i, HelmTexture = %i, HairColor = %i, BeardColor = %i, EyeColor1 = %i, EyeColor2 = %i, HairStyle = %i, Face = %i, DrakkinHeritage = %i, DrakkinTattoo = %i, DrakkinDetails = %i, Size = %f",
|
||||
Log.Out(Logs::Detail, Logs::Spells, "Illusion: Race = %i, Gender = %i, Texture = %i, HelmTexture = %i, HairColor = %i, BeardColor = %i, EyeColor1 = %i, EyeColor2 = %i, HairStyle = %i, Face = %i, DrakkinHeritage = %i, DrakkinTattoo = %i, DrakkinDetails = %i, Size = %f",
|
||||
race, gender, texture, helmtexture, haircolor, beardcolor, eyecolor1, eyecolor2, hairstyle, luclinface, drakkin_heritage, drakkin_tattoo, drakkin_details, size);
|
||||
}
|
||||
|
||||
@@ -1764,7 +1764,6 @@ bool Mob::IsPlayerRace(uint16 in_race) {
|
||||
|
||||
|
||||
uint8 Mob::GetDefaultGender(uint16 in_race, uint8 in_gender) {
|
||||
//std::cout << "Gender in: " << (int)in_gender << std::endl; // undefined cout [CODEBUG]
|
||||
if (Mob::IsPlayerRace(in_race) || in_race == 15 || in_race == 50 || in_race == 57 || in_race == 70 || in_race == 98 || in_race == 118) {
|
||||
if (in_gender >= 2) {
|
||||
// Male default for PC Races
|
||||
@@ -2880,7 +2879,6 @@ int16 Mob::GetResist(uint8 type) const
|
||||
|
||||
uint32 Mob::GetLevelHP(uint8 tlevel)
|
||||
{
|
||||
//std::cout<<"Tlevel: "<<(int)tlevel<<std::endl; // cout undefined [CODEBUG]
|
||||
int multiplier = 0;
|
||||
if (tlevel < 10)
|
||||
{
|
||||
@@ -2945,7 +2943,7 @@ void Mob::ExecWeaponProc(const ItemInst *inst, uint16 spell_id, Mob *on) {
|
||||
if(!IsValidSpell(spell_id)) { // Check for a valid spell otherwise it will crash through the function
|
||||
if(IsClient()){
|
||||
Message(0, "Invalid spell proc %u", spell_id);
|
||||
mlog(CLIENT__SPELLS, "Player %s, Weapon Procced invalid spell %u", this->GetName(), spell_id);
|
||||
Log.Out(Logs::Detail, Logs::Spells, "Player %s, Weapon Procced invalid spell %u", this->GetName(), spell_id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3128,8 +3126,8 @@ int Mob::GetSnaredAmount()
|
||||
{
|
||||
int val = CalcSpellEffectValue_formula(spells[buffs[i].spellid].formula[j], spells[buffs[i].spellid].base[j], spells[buffs[i].spellid].max[j], buffs[i].casterlevel, buffs[i].spellid);
|
||||
//int effect = CalcSpellEffectValue(buffs[i].spellid, spells[buffs[i].spellid].effectid[j], buffs[i].casterlevel);
|
||||
if (val < 0 && abs(val) > worst_snare)
|
||||
worst_snare = abs(val);
|
||||
if (val < 0 && std::abs(val) > worst_snare)
|
||||
worst_snare = std::abs(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4436,7 +4434,7 @@ void Mob::MeleeLifeTap(int32 damage) {
|
||||
if(lifetap_amt && damage > 0){
|
||||
|
||||
lifetap_amt = damage * lifetap_amt / 100;
|
||||
mlog(COMBAT__DAMAGE, "Melee lifetap healing for %d damage.", damage);
|
||||
Log.Out(Logs::Detail, Logs::Combat, "Melee lifetap healing for %d damage.", damage);
|
||||
|
||||
if (lifetap_amt > 0)
|
||||
HealDamage(lifetap_amt); //Heal self for modified damage amount.
|
||||
@@ -4495,7 +4493,8 @@ void Mob::DoGravityEffect()
|
||||
if(value > 0)
|
||||
away = 1;
|
||||
|
||||
amount = fabs(value) / (100.0f); // to bring the values in line, arbitarily picked
|
||||
amount = std::abs(value) /
|
||||
(100.0f); // to bring the values in line, arbitarily picked
|
||||
|
||||
x_vector = cur_x - caster_x;
|
||||
y_vector = cur_y - caster_y;
|
||||
@@ -4514,7 +4513,7 @@ void Mob::DoGravityEffect()
|
||||
}
|
||||
}
|
||||
|
||||
if((fabs(my_x - cur_x) > 0.01) || (fabs(my_y - cur_y) > 0.01)) {
|
||||
if ((std::abs(my_x - cur_x) > 0.01) || (std::abs(my_y - cur_y) > 0.01)) {
|
||||
float new_ground = GetGroundZ(cur_x, cur_y);
|
||||
// If we cant get LoS on our new spot then keep checking up to 5 units up.
|
||||
if(!CheckLosFN(cur_x, cur_y, new_ground, GetSize())) {
|
||||
@@ -5174,7 +5173,7 @@ bool Mob::IsFacingMob(Mob *other)
|
||||
if (angle < 40.0 && heading > 472.0)
|
||||
angle = heading;
|
||||
|
||||
if (fabs(angle - heading) <= 80.0)
|
||||
if (std::abs(angle - heading) <= 80.0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -5188,8 +5187,8 @@ float Mob::HeadingAngleToMob(Mob *other)
|
||||
float this_x = GetX();
|
||||
float this_y = GetY();
|
||||
|
||||
float y_diff = fabs(this_y - mob_y);
|
||||
float x_diff = fabs(this_x - mob_x);
|
||||
float y_diff = std::abs(this_y - mob_y);
|
||||
float x_diff = std::abs(this_x - mob_x);
|
||||
if (y_diff < 0.0000009999999974752427)
|
||||
y_diff = 0.0000009999999974752427;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user