mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Rules] Add Resurrection Sickness rules for Characters/Bots. (#1692)
* [Rules] Add Resurrection Sickness rule for Characters/Bots. - Add RULE_BOOL(Character, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.") - Add RULE_BOOL(Bots, UseOldRaceRezEffects, false, "Older clients had ID 757 for races with high starting STR, but it doesn't seem used anymore") - Add RULE_BOOL(Bots, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.") * Add rules for spell IDs. * Fix bot health on spawn when resurrection sickness is disabled. - Formatting. * Remove 'this' keyword.
This commit is contained in:
+20
-4
@@ -398,10 +398,26 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
current_hp = max_hp;
|
||||
|
||||
if(current_hp <= 0) {
|
||||
SetHP(max_hp/5);
|
||||
SetMana(0);
|
||||
BuffFadeAll();
|
||||
SpellOnTarget(756, this); // Rezz effects
|
||||
BuffFadeNonPersistDeath();
|
||||
if (RuleB(Bots, ResurrectionSickness)) {
|
||||
int resurrection_sickness_spell_id = (
|
||||
RuleB(Bots, OldRaceRezEffects) &&
|
||||
(
|
||||
GetRace() == BARBARIAN ||
|
||||
GetRace() == DWARF ||
|
||||
GetRace() == TROLL ||
|
||||
GetRace() == OGRE
|
||||
) ?
|
||||
RuleI(Bots, OldResurrectionSicknessSpell) :
|
||||
RuleI(Bots, ResurrectionSicknessSpell)
|
||||
);
|
||||
SetHP(max_hp / 5);
|
||||
SetMana(0);
|
||||
SpellOnTarget(resurrection_sickness_spell_id, this); // Rezz effects
|
||||
} else {
|
||||
SetHP(GetMaxHP());
|
||||
SetMana(GetMaxMana());
|
||||
}
|
||||
}
|
||||
|
||||
if(current_mana > max_mana)
|
||||
|
||||
Reference in New Issue
Block a user