|
when u click the Chi study or learn the subclass u should call the chi HpAdd calculation or subclass HpAdd calculation
and if u want to be more safe (but cost Pc performance) u can create void like this
public void UpdateStats()
{
CalculateVitals();
CalculateItemStats();
CalculateChiPowers();
CalculateSubClassPowers();
}
the vitals and itemstats u already have,so u just need to create chi and subclass voids
then whenever the client request Equip/unequip Item or learn/upgrade subclass or study Chi u call that updatestats void
* of course this is for ur source , my source is a bit different structured as i calculate vitals just once when the client login
itemstats called only when Equip/unequip an item
same Chi/subclass , i dont get every variable to Zero when anything changed as ur source does, yet u can still follow the procedure provided at top of this post which will be again
*when client Equip/UnEquip an item ----- > Client.UpdateStats();
*when client request changes to stats points ----- > Client.UpdateStats();
*when client Learn/Upgrade SubClass ----- > Client.UpdateStats();
*when client Learn/Study Chi ----- > Client.UpdateStats();
|