Beispiel #1
0
 public void NotifyDropEvent(ref GameDeadEventParam prm)
 {
     DebugHelper.Assert((bool)prm.src);
     if ((ActorHelper.IsHostEnemyActor(ref prm.src) && (this.DropStrategy != null)) && this.DropStrategy.isSupportDrop)
     {
         this.DropStrategy.NotifyDropEvent(prm.src);
     }
 }
        private bool CheckTargetFromEnemy(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> target)
        {
            bool flag = false;

            if ((src != 0) && (target != 0))
            {
                float num2;
                float num3;
                if (src.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)
                {
                    return(flag);
                }
                if (target.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Monster)
                {
                    return(ActorHelper.IsHostEnemyActor(ref target));
                }
                MonsterWrapper wrapper = target.handle.AsMonster();
                if (wrapper == null)
                {
                    return(flag);
                }
                RES_MONSTER_TYPE bMonsterType = (RES_MONSTER_TYPE)wrapper.cfgInfo.bMonsterType;
                if (bMonsterType == RES_MONSTER_TYPE.RES_MONSTER_TYPE_SOLDIERLINE)
                {
                    if (src.handle.TheActorMeta.ActorCamp != target.handle.TheActorMeta.ActorCamp)
                    {
                        flag = true;
                    }
                    return(flag);
                }
                if (bMonsterType != RES_MONSTER_TYPE.RES_MONSTER_TYPE_JUNGLE)
                {
                    return(flag);
                }
                switch (wrapper.GetActorSubSoliderType())
                {
                case 8:
                case 9:
                case 7:
                case 14:
                    return(flag);

                default:
                {
                    num2 = 0f;
                    num3 = 0f;
                    Vector3 position = target.handle.gameObject.transform.position;
                    List <PoolObjHandle <ActorRoot> > organActors = Singleton <GameObjMgr> .instance.OrganActors;
                    int num4 = 0;
                    for (int i = 0; i < organActors.Count; i++)
                    {
                        PoolObjHandle <ActorRoot> handle = organActors[i];
                        if (handle.handle.TheStaticData.TheOrganOnlyInfo.OrganType == 2)
                        {
                            Vector3 b = handle.handle.gameObject.transform.position;
                            if (handle.handle.TheActorMeta.ActorCamp == src.handle.TheActorMeta.ActorCamp)
                            {
                                num2 = Vector3.Distance(position, b);
                            }
                            else
                            {
                                num3 = Vector3.Distance(position, b);
                            }
                            num4++;
                            if (num4 >= 2)
                            {
                                break;
                            }
                        }
                    }
                    break;
                }
                }
                if (num2 > num3)
                {
                    flag = true;
                }
            }
            return(flag);
        }