diff --git a/changelog.txt b/changelog.txt index 3a72ea152..b75a58dbc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 11/24/2014 == +Trevius: Spells that modify model size are now limited to 2 size adjustments from the base size. + == 11/24/2014 == Trevius: Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience. diff --git a/utils/sql/git/optional/2014_11_24_EnableMeritBasedFaction.sql b/utils/sql/git/optional/2014_11_24_EnableMeritBasedFaction.sql index 67e1b1888..942b016ab 100644 --- a/utils/sql/git/optional/2014_11_24_EnableMeritBasedFaction.sql +++ b/utils/sql/git/optional/2014_11_24_EnableMeritBasedFaction.sql @@ -1 +1 @@ -INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'NPC:EnableMeritBasedFaction', 'false', 'If set to true, faction will given in the same way as experience (solo/group/raid).'); \ No newline at end of file +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'NPC:EnableMeritBasedFaction', 'false', 'If set to true, faction will be given in the same way as experience (solo/group/raid).'); \ No newline at end of file diff --git a/zone/merc.cpp b/zone/merc.cpp index 2ecd0849e..489b51e56 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -4338,7 +4338,7 @@ Corpse* Merc::GetGroupMemberCorpse() { if(g->members[i] && g->members[i]->IsClient()) { corpse = entity_list.GetCorpseByOwnerWithinRange(g->members[i]->CastToClient(), this, RuleI(Mercs, ResurrectRadius)); - if(corpse && !corpse->IsRezzed()) { + if(corpse && !corpse->Rezzed()) { return corpse; } } @@ -5540,7 +5540,7 @@ void Client::SpawnMercOnZone() { } else { - int32 TimeDiff = GetMercInfo().SuspendedTime + RuleI(Mercs, SuspendIntervalS) - time(nullptr); + int32 TimeDiff = GetMercInfo().SuspendedTime - time(nullptr); if (TimeDiff > 0) { if (!GetPTimers().Enabled(pTimerMercSuspend)) @@ -6367,4 +6367,4 @@ uint32 Merc::CalcUpkeepCost(uint32 templateID , uint8 level, uint8 currency_type } return cost; -} +} \ No newline at end of file diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 447d34efd..d73c667a1 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1665,7 +1665,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Model Size: %d%%", effect_value); #endif - ChangeSize(GetSize() * (static_cast(effect_value) / 100.0f)); + // Only allow 2 size changes from Base Size + float modifyAmount = (static_cast(effect_value) / 100.0f); + float maxModAmount = GetBaseSize() * modifyAmount * modifyAmount; + if ((GetSize() <= GetBaseSize() && GetSize() > maxModAmount) || + (GetSize() >= GetBaseSize() && GetSize() < maxModAmount) || + (GetSize() <= GetBaseSize() && maxModAmount > 1.0f) || + (GetSize() >= GetBaseSize() && maxModAmount < 1.0f)) + { + ChangeSize(GetSize() * modifyAmount); + } break; }