mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
Fix for 'sqrt' failures on vs2010 clients
This commit is contained in:
parent
f89d783308
commit
489a6ffd16
@ -7,6 +7,7 @@ Kayen: Fixed SE_SpellProcChance - Now works on spell dervived procs
|
||||
cavedude: Added two new NPC special_abilities. ALWAYS_FLEE, which forces the NPC to always flee ignoring FleeIfNotAlone and FLEE_PERCENT which allows you to change the HP an individual NPC will flee at. If no value is set, the rule is used as normal.
|
||||
cavedude: Fixed an issue where rectangular roamboxes could cause an NPC to get stuck on a single coord.
|
||||
cavedude: Added a new roambox column, mindelay allowing you to have more control over the roambox delay.
|
||||
Uleat: Fix for 'sqrt' failure on vs2010 clients
|
||||
|
||||
Required SQL: utils/sql/git/required/2014_02_26_roambox_update.sql
|
||||
|
||||
|
||||
@ -3419,13 +3419,11 @@ void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caste
|
||||
{
|
||||
if (spellbonuses.DistanceRemoval){
|
||||
|
||||
int distance = sqrt(
|
||||
((int(GetX()) - buffs[slot].caston_x) * (int(GetX()) - buffs[slot].caston_x)) +
|
||||
((int(GetY()) - buffs[slot].caston_y) * (int(GetY()) - buffs[slot].caston_y)) +
|
||||
((int(GetZ()) - buffs[slot].caston_z) * (int(GetZ()) - buffs[slot].caston_z))
|
||||
);
|
||||
int distance = ((int(GetX()) - buffs[slot].caston_x) * (int(GetX()) - buffs[slot].caston_x)) +
|
||||
((int(GetY()) - buffs[slot].caston_y) * (int(GetY()) - buffs[slot].caston_y)) +
|
||||
((int(GetZ()) - buffs[slot].caston_z) * (int(GetZ()) - buffs[slot].caston_z));
|
||||
|
||||
if (distance > spells[spell_id].base[i]){
|
||||
if (distance > (spells[spell_id].base[i] * spells[spell_id].base[i])){
|
||||
|
||||
if(!TryFadeEffect(slot))
|
||||
BuffFadeBySlot(slot , true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user