public void ChangeGoldCoinInBattle(int changeValue, bool isIncome, bool floatDigit = false, Vector3 position = default(Vector3), bool isLastHit = false, PoolObjHandle <ActorRoot> target = default(PoolObjHandle <ActorRoot>)) { int num = this.m_goldCoinInBattle; this.m_goldCoinInBattle += changeValue; if (changeValue > 0 && isIncome) { this.m_goldCoinIncomeInBattle += changeValue; this.m_MaxGoldCoinIncomeInBattle = ((this.m_MaxGoldCoinIncomeInBattle > changeValue) ? this.m_MaxGoldCoinIncomeInBattle : changeValue); } DebugHelper.Assert(this.m_goldCoinInBattle >= 0, "Wo ri, zhe zenme keneng"); bool flag = false; HeroWrapper heroWrapper = this.actorPtr.handle.ActorControl as HeroWrapper; if (heroWrapper != null) { PoolObjHandle <ActorRoot> callActor = heroWrapper.GetCallActor(); if (callActor && callActor.handle.Visible && ActorHelper.IsHostCtrlActor(ref callActor)) { flag = true; } } if (floatDigit && changeValue > 0 && isIncome && ((this.actor.Visible && ActorHelper.IsHostCtrlActor(ref this.actorPtr)) || flag)) { if (position.x == 0f && position.y == 0f && position.z == 0f) { position = this.actor.myTransform.position; } Singleton <CBattleSystem> .GetInstance().CreateBattleFloatDigit(changeValue, isLastHit ? DIGIT_TYPE.ReceiveLastHitGoldCoinInBattle : DIGIT_TYPE.ReceiveGoldCoinInBattle, position); } Singleton <EventRouter> .GetInstance().BroadCastEvent <PoolObjHandle <ActorRoot>, int, bool, PoolObjHandle <ActorRoot> >("HeroGoldCoinInBattleChange", this.actorPtr, changeValue, isIncome, target); }
private void onActorUseSkill(ref ActorSkillEventParam _prm) { if (this.localParams[1] == 1) { if (!this.sourceActor || this.sourceActor.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero) { return; } HeroWrapper heroWrapper = this.sourceActor.handle.ActorControl as HeroWrapper; if (heroWrapper == null || heroWrapper.GetCallActor() != _prm.src) { return; } } else if (_prm.src != this.sourceActor) { return; } if (this.localParams[0] == 0) { this.bTrigger = true; } else if ((this.localParams[0] & 1 << (int)_prm.slot) > 0) { this.bTrigger = true; } }