mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Revision of slow mitigation code.
Fix for the slow mitigation spam messages Converted value from FLOAT to INT Use SQL to update your npc_types table
This commit is contained in:
+25
-2
@@ -4651,8 +4651,12 @@ void Mob::CastOnNumHitFade(uint32 spell_id)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
int Mob::SlowMitigation(bool slow_msg, Mob *caster, int slow_value)
|
||||
{
|
||||
if (slow_mitigation)
|
||||
return 0;
|
||||
|
||||
float int_slow_mitigation = slow_mitigation * 100.0f;
|
||||
|
||||
if (int_slow_mitigation > 100.0f)
|
||||
@@ -4663,10 +4667,10 @@ int Mob::SlowMitigation(bool slow_msg, Mob *caster, int slow_value)
|
||||
if (caster && caster->IsClient())
|
||||
{
|
||||
if ((int_slow_mitigation > 0.0f) && (int_slow_mitigation < 26.0f))
|
||||
caster->Message(262, "Your spell was mostly successful");
|
||||
caster->Message_StringID(MT_Spells, SLOW_MOSTLY_SUCCESSFUL);
|
||||
|
||||
else if ((int_slow_mitigation >= 26.0f) && (int_slow_mitigation < 74.0f))
|
||||
caster->Message(262, "Your spell was partially successful");
|
||||
caster->Message_StringID(MT_Spells, SLOW_PARTIALLY_SUCCESSFUL);
|
||||
|
||||
else if ((int_slow_mitigation >= 74.0f) && (int_slow_mitigation < 101.0f))
|
||||
caster->Message(262, "Your spell was slightly successful");
|
||||
@@ -4680,6 +4684,25 @@ int Mob::SlowMitigation(bool slow_msg, Mob *caster, int slow_value)
|
||||
return slow_value;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void Mob::SlowMitigation(Mob* caster)
|
||||
{
|
||||
if (GetSlowMitigation() && caster && caster->IsClient())
|
||||
{
|
||||
if ((GetSlowMitigation() > 0) && (GetSlowMitigation() < 26))
|
||||
caster->Message_StringID(MT_SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
|
||||
|
||||
else if ((GetSlowMitigation() >= 26) && (GetSlowMitigation() < 74))
|
||||
caster->Message_StringID(MT_SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
|
||||
|
||||
else if ((GetSlowMitigation() >= 74) && (GetSlowMitigation() < 101))
|
||||
caster->Message_StringID(MT_SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
|
||||
|
||||
else if (GetSlowMitigation() > 100)
|
||||
caster->Message_StringID(MT_SpellFailure, SPELL_OPPOSITE_EFFECT);
|
||||
}
|
||||
}
|
||||
|
||||
uint16 Mob::GetSkillByItemType(int ItemType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user