View Single Post
  #5  
Old 05-16-2011, 05:09 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Hmm, forcing them to sitting seems like the wrong approach to me. You know they're on a horse, so I think something like this might be better. I haven't tested it, but I think the logic is correct. It works the same as mana regen when sitting or mounted as seen in Client::CalcManaRegen() and Client::CalcBaseManaRegen().

client_process.cpp
Code:
void Client::CalcRestState() {

	// This method calculates rest state HP and mana regeneration.
	// The client must have been out of combat for RuleI(Character, RestRegenTimeToActivate) seconds,
	// must be sitting down or mounted, and must not have any detrimental spells affecting them.
	//
	if(!RuleI(Character, RestRegenPercent))
		return;

	RestRegenHP = RestRegenMana = RestRegenEndurance = 0;

        if(AggroCount || !IsSitting() || !GetHorseId())
		return;
Reply With Quote