Merge of a monster

This commit is contained in:
KimLS
2017-04-02 20:03:51 -07:00
146 changed files with 10532 additions and 7432 deletions
+17 -16
View File
@@ -488,7 +488,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(!target_zone) {
#ifdef SPELL_EFFECT_SPAM
Log.Out(Logs::General, Logs::None, "Succor/Evacuation Spell In Same Zone.");
Log(Logs::General, Logs::None, "Succor/Evacuation Spell In Same Zone.");
#endif
if(IsClient())
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x, y, z, heading, 0, EvacToSafeCoords);
@@ -497,7 +497,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
}
else {
#ifdef SPELL_EFFECT_SPAM
Log.Out(Logs::General, Logs::None, "Succor/Evacuation Spell To Another Zone.");
Log(Logs::General, Logs::None, "Succor/Evacuation Spell To Another Zone.");
#endif
if(IsClient())
CastToClient()->MovePC(target_zone, x, y, z, heading);
@@ -709,7 +709,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
stun_resist += aabonuses.StunResist;
if (stun_resist <= 0 || zone->random.Int(0,99) >= stun_resist) {
Log.Out(Logs::Detail, Logs::Combat, "Stunned. We had %d percent resist chance.", stun_resist);
Log(Logs::Detail, Logs::Combat, "Stunned. We had %d percent resist chance.", stun_resist);
if (caster && caster->IsClient())
effect_value += effect_value*caster->GetFocusEffect(focusFcStunTimeMod, spell_id)/100;
@@ -719,7 +719,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (IsClient())
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
Log.Out(Logs::Detail, Logs::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
Log(Logs::Detail, Logs::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
}
}
break;
@@ -1660,7 +1660,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (IsCorpse() && CastToCorpse()->IsPlayerCorpse()) {
if(caster)
Log.Out(Logs::Detail, Logs::Spells, " corpse being rezzed using spell %i by %s",
Log(Logs::Detail, Logs::Spells, " corpse being rezzed using spell %i by %s",
spell_id, caster->GetName());
CastToCorpse()->CastRezz(spell_id, caster);
@@ -1783,7 +1783,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
}
else {
Message_StringID(4, TARGET_NOT_FOUND);
Log.Out(Logs::General, Logs::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
Log(Logs::General, Logs::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
}
}
@@ -3072,12 +3072,13 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
spells[spell_id].effectid[effect_id] != SE_ChangeFrenzyRad &&
spells[spell_id].effectid[effect_id] != SE_Harmony &&
spells[spell_id].effectid[effect_id] != SE_CurrentMana &&
spells[spell_id].effectid[effect_id] != SE_ManaRegen_v2) {
spells[spell_id].effectid[effect_id] != SE_ManaRegen_v2 &&
spells[spell_id].effectid[effect_id] != SE_AddFaction) {
int oval = effect_value;
int mod = ApplySpellEffectiveness(spell_id, instrument_mod, true, caster_id);
effect_value = effect_value * mod / 10;
Log.Out(Logs::Detail, Logs::Spells, "Effect value %d altered with bard modifier of %d to yeild %d",
Log(Logs::Detail, Logs::Spells, "Effect value %d altered with bard modifier of %d to yeild %d",
oval, mod, effect_value);
}
@@ -3140,7 +3141,7 @@ snare has both of them negative, yet their range should work the same:
updownsign = 1;
}
Log.Out(Logs::Detail, Logs::Spells, "CSEV: spell %d, formula %d, base %d, max %d, lvl %d. Up/Down %d",
Log(Logs::Detail, Logs::Spells, "CSEV: spell %d, formula %d, base %d, max %d, lvl %d. Up/Down %d",
spell_id, formula, base, max, caster_level, updownsign);
switch(formula)
@@ -3362,7 +3363,7 @@ snare has both of them negative, yet their range should work the same:
result = ubase * (caster_level * (formula - 2000) + 1);
}
else
Log.Out(Logs::General, Logs::None, "Unknown spell effect value forumula %d", formula);
Log(Logs::General, Logs::None, "Unknown spell effect value forumula %d", formula);
}
}
@@ -3387,7 +3388,7 @@ snare has both of them negative, yet their range should work the same:
if (base < 0 && result > 0)
result *= -1;
Log.Out(Logs::Detail, Logs::Spells, "Result: %d (orig %d), cap %d %s", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
Log(Logs::Detail, Logs::Spells, "Result: %d (orig %d), cap %d %s", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
return result;
}
@@ -3414,12 +3415,12 @@ void Mob::BuffProcess()
--buffs[buffs_i].ticsremaining;
if (buffs[buffs_i].ticsremaining < 0) {
Log.Out(Logs::Detail, Logs::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
Log(Logs::Detail, Logs::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
BuffFadeBySlot(buffs_i);
}
else
{
Log.Out(Logs::Detail, Logs::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
Log(Logs::Detail, Logs::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
}
}
else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater))
@@ -3760,7 +3761,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if (IsClient() && !CastToClient()->IsDead())
CastToClient()->MakeBuffFadePacket(buffs[slot].spellid, slot);
Log.Out(Logs::Detail, Logs::Spells, "Fading buff %d from slot %d", buffs[slot].spellid, slot);
Log(Logs::Detail, Logs::Spells, "Fading buff %d from slot %d", buffs[slot].spellid, slot);
if(spells[buffs[slot].spellid].viral_targets > 0) {
bool last_virus = true;
@@ -4789,7 +4790,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
return 0;
break;
default:
Log.Out(Logs::General, Logs::Normal, "CalcFocusEffect: unknown limit spelltype %d",
Log(Logs::General, Logs::Normal, "CalcFocusEffect: unknown limit spelltype %d",
focus_spell.base[i]);
}
break;
@@ -5146,7 +5147,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
// this spits up a lot of garbage when calculating spell focuses
// since they have all kinds of extra effects on them.
default:
Log.Out(Logs::General, Logs::Normal, "CalcFocusEffect: unknown effectid %d",
Log(Logs::General, Logs::Normal, "CalcFocusEffect: unknown effectid %d",
focus_spell.effectid[i]);
#endif
}