internal override void HandleAttrChanged(Attr attr, object oldValue, object newValue) { base.HandleAttrChanged(attr, oldValue, newValue); switch (attr) { case Attr.Lvl: if (( int )newValue > ( int )oldValue) { Effect fx = this.battle.CreateEffect("e164"); fx.SetupTerritory(this, null, Vector3.zero); this.ApplyLevel(this.property.lvl); } break; case Attr.Stealth: this.UpdateStealth(); break; case Attr.Stunned: if (( int )newValue > 0) { this.ChangeState(FSMStateType.Idle); } break; } foreach (KeyValuePair <string, VBSBase> kv in this._buffStates) { kv.Value.OnAttrChanged(attr, oldValue, newValue); } UIEvent.AttrChanged(this, attr, oldValue, newValue); }