public HURT_INFO(HurtTypeDef _hurtType, string _strIconName, string _strName, int _iValue, SKILL_USE_FROM_TYPE _skillUseFrom)
 {
     this.hurtType     = _hurtType;
     this.strIconName  = _strIconName;
     this.strName      = _strName;
     this.iValue       = _iValue;
     this.SkillUseFrom = _skillUseFrom;
 }
Example #2
0
 public void Reset()
 {
     this.SlotType    = SkillSlotType.SLOT_SKILL_0;
     this.AppointType = SkillRangeAppointType.Auto;
     this.TargetID    = 0u;
     this.UseVector   = VInt3.zero;
     this.bSpecialUse = false;
     this.bExposing   = false;
     this.TargetActor.Release();
     this.Originator.Release();
     this.Instigator   = null;
     this.skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL;
     this.uiFromId     = 0u;
     this.MarkCount    = 0;
 }
 public void Copy(ref SkillUseParam param)
 {
     this.Reset();
     this.SlotType     = param.SlotType;
     this.AppointType  = param.AppointType;
     this.TargetID     = param.TargetID;
     this.UseVector    = param.UseVector;
     this.bSpecialUse  = param.bSpecialUse;
     this.TargetActor  = param.TargetActor;
     this.Originator   = param.Originator;
     this.Instigator   = param.Instigator;
     this.bExposing    = param.bExposing;
     this.skillUseFrom = param.skillUseFrom;
     this.uiFromId     = param.uiFromId;
     this.MarkCount    = param.MarkCount;
 }
Example #4
0
 public void InitTalent(int _talentID, SKILL_USE_FROM_TYPE skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL, uint uiFromId = 0u)
 {
     if (this.talentCount < 10)
     {
         PassiveSkill passiveSkill = new PassiveSkill(_talentID, this.actor);
         if (passiveSkill.skillContext != null)
         {
             passiveSkill.skillContext.uiFromId     = uiFromId;
             passiveSkill.skillContext.skillUseFrom = skillUseFrom;
         }
         for (int i = 0; i < 10; i++)
         {
             if (this.TalentObjArray[i] == null)
             {
                 this.TalentObjArray[i] = passiveSkill;
                 this.talentCount++;
                 return;
             }
         }
     }
 }
 public void Copy(SkillUseContext rhs)
 {
     this.SlotType    = rhs.SlotType;
     this.AppointType = rhs.AppointType;
     this.TargetID    = rhs.TargetID;
     this.UseVector   = rhs.UseVector;
     this.EndVector   = rhs.EndVector;
     this.EffectPos   = rhs.EffectPos;
     this.EffectDir   = rhs.EffectDir;
     this.BulletPos   = rhs.BulletPos;
     this.TargetActor = rhs.TargetActor;
     this.Originator  = rhs.Originator;
     this.Instigator  = rhs.Instigator;
     this.bSpecialUse = rhs.bSpecialUse;
     this.GatherTime  = rhs.GatherTime;
     this.EffectCount = rhs.EffectCount;
     this.EffectCountInSingleTrigger = rhs.EffectCountInSingleTrigger;
     this.MarkCount    = rhs.MarkCount;
     this.bExposing    = rhs.bExposing;
     this.skillUseFrom = rhs.skillUseFrom;
     this.uiFromId     = rhs.uiFromId;
 }
 public void Reset()
 {
     this.SlotType    = SkillSlotType.SLOT_SKILL_VALID;
     this.AppointType = SkillRangeAppointType.Auto;
     this.TargetID    = 0u;
     this.UseVector   = VInt3.zero;
     this.EndVector   = VInt3.zero;
     this.EffectPos   = VInt3.zero;
     this.EffectDir   = VInt3.zero;
     this.BulletPos   = VInt3.zero;
     this.bSpecialUse = false;
     this.GatherTime  = 1;
     this.EffectCount = 0;
     this.EffectCountInSingleTrigger = 0;
     this.MarkCount = 0;
     this.TargetActor.Release();
     this.Originator.Release();
     this.Instigator   = null;
     this.bExposing    = false;
     this.skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL;
     this.uiFromId     = 0u;
 }
        private void AddDamageValue(ref HurtEventResultInfo prm)
        {
            PoolObjHandle <ActorRoot> atker   = prm.atker;
            SkillSlotType             atkSlot = prm.hurtInfo.atkSlot;
            int                 hurtTotal     = prm.hurtTotal;
            HurtTypeDef         hurtType      = prm.hurtInfo.hurtType;
            SKILL_USE_FROM_TYPE skillUseFrom  = prm.hurtInfo.SkillUseFrom;

            if (this.m_listDamageActorValue != null && atkSlot <= SkillSlotType.SLOT_SKILL_VALID && atker)
            {
                uint objID = atker.handle.ObjID;
                this.DeleteTimeoutDamageValue(objID, 0uL);
                DAMAGE_ACTOR_INFO dAMAGE_ACTOR_INFO;
                if (!this.m_listDamageActorValue.TryGetValue(objID, ref dAMAGE_ACTOR_INFO))
                {
                    dAMAGE_ACTOR_INFO           = default(DAMAGE_ACTOR_INFO);
                    dAMAGE_ACTOR_INFO.actorType = atker.handle.TheActorMeta.ActorType;
                    dAMAGE_ACTOR_INFO.actorName = atker.handle.name;
                    dAMAGE_ACTOR_INFO.ConfigId  = atker.handle.TheActorMeta.ConfigId;
                    if (dAMAGE_ACTOR_INFO.actorType == ActorTypeDef.Actor_Type_Monster)
                    {
                        MonsterWrapper monsterWrapper = atker.handle.AsMonster();
                        dAMAGE_ACTOR_INFO.bMonsterType = monsterWrapper.GetActorSubType();
                        dAMAGE_ACTOR_INFO.actorSubType = monsterWrapper.GetActorSubSoliderType();
                    }
                    Player player = Singleton <GamePlayerCenter> .instance.GetPlayer(atker.handle.TheActorMeta.PlayerId);

                    if (player != null)
                    {
                        dAMAGE_ACTOR_INFO.playerName = player.Name;
                    }
                    dAMAGE_ACTOR_INFO.listDamage = new SortedList <ulong, SKILL_SLOT_HURT_INFO[]>();
                    this.m_listDamageActorValue.Add(objID, dAMAGE_ACTOR_INFO);
                }
                ulong logicFrameTick = Singleton <FrameSynchr> .instance.LogicFrameTick;
                SKILL_SLOT_HURT_INFO[] array;
                if (!dAMAGE_ACTOR_INFO.listDamage.TryGetValue(logicFrameTick, ref array))
                {
                    array = new SKILL_SLOT_HURT_INFO[12];
                    dAMAGE_ACTOR_INFO.listDamage.Add(logicFrameTick, array);
                }
                if (array[(int)atkSlot].listHurtInfo == null)
                {
                    array[(int)atkSlot].listHurtInfo = new List <HURT_INFO>();
                }
                if (array[(int)atkSlot].listHurtInfo != null)
                {
                    string text    = null;
                    string strName = null;
                    if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL)
                    {
                        SkillSlot skillSlot;
                        if (atkSlot < SkillSlotType.SLOT_SKILL_COUNT && atker.handle.SkillControl != null && (atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero || atkSlot != SkillSlotType.SLOT_SKILL_0) && atker.handle.SkillControl.TryGetSkillSlot(atkSlot, out skillSlot) && skillSlot.SkillObj != null && skillSlot.SkillObj.cfgData != null)
                        {
                            if (!string.IsNullOrEmpty(skillSlot.SkillObj.IconName))
                            {
                                text = skillSlot.SkillObj.IconName;
                            }
                            if (!string.IsNullOrEmpty(skillSlot.SkillObj.cfgData.szSkillName))
                            {
                                strName = skillSlot.SkillObj.cfgData.szSkillName;
                            }
                        }
                    }
                    else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP)
                    {
                        uint             uiFromId  = prm.hurtInfo.uiFromId;
                        ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey(uiFromId);
                        if (dataByKey != null)
                        {
                            text    = dataByKey.szIcon;
                            strName = dataByKey.szName;
                        }
                    }
                    else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_AREATRIGGER)
                    {
                        uint uiFromId2 = prm.hurtInfo.uiFromId;
                        ResSkillCombineCfgInfo dataByKey2 = GameDataMgr.skillCombineDatabin.GetDataByKey(uiFromId2);
                        if (dataByKey2 != null)
                        {
                            text    = dataByKey2.szIconPath;
                            strName = dataByKey2.szSkillCombineName;
                        }
                    }
                    int count = array[(int)atkSlot].listHurtInfo.get_Count();
                    int i;
                    for (i = 0; i < count; i++)
                    {
                        if (array[(int)atkSlot].listHurtInfo.get_Item(i).strIconName == text)
                        {
                            HURT_INFO hURT_INFO;
                            array[(int)atkSlot].listHurtInfo.get_Item(i).iValue = hURT_INFO.iValue + hurtTotal;
                            break;
                        }
                    }
                    if (i >= count)
                    {
                        HURT_INFO hURT_INFO2 = new HURT_INFO(hurtType, text, strName, hurtTotal, skillUseFrom);
                        array[(int)atkSlot].listHurtInfo.Add(hURT_INFO2);
                    }
                }
                dAMAGE_ACTOR_INFO.listDamage.set_Item(logicFrameTick, array);
                this.m_listDamageActorValue.set_Item(objID, dAMAGE_ACTOR_INFO);
            }
        }
 public void CreateTalent(int _talentID, SKILL_USE_FROM_TYPE skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL, uint uiFromId = 0u)
 {
     this.talentSystem.InitTalent(_talentID, skillUseFrom, uiFromId);
 }