mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 08:26:36 +00:00
Spells that modify model size are now limited to 2 size adjustments from the base size.
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -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<float>(effect_value) / 100.0f));
|
||||
// Only allow 2 size changes from Base Size
|
||||
float modifyAmount = (static_cast<float>(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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user