public static string GetHero_Icon(PoolObjHandle <ActorRoot> actor, bool bSmall = false) { if (!actor) { return(string.Empty); } return(KillNotifyUT.GetHero_Icon(ref actor.get_handle().TheActorMeta, bSmall)); }
public static string GetHero_Icon(ActorRoot actor, bool bSmall) { string result = string.Empty; if (actor != null) { result = KillNotifyUT.GetHero_Icon(ref actor.TheActorMeta, bSmall); } return(result); }
public static string GetHero_Icon(ref ActorMeta actorMeta, bool bSmall = false) { string result = string.Empty; IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .get_instance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); ActorServerData actorServerData = default(ActorServerData); if (actorDataProvider != null && actorDataProvider.GetActorServerData(ref actorMeta, ref actorServerData)) { result = KillNotifyUT.GetHero_Icon((uint)actorServerData.TheActorMeta.ConfigId, 0u, bSmall); } return(result); }
public static KillInfo Convert_DetailInfo_KillInfo(KillDetailInfo detail) { KillDetailInfoType killDetailInfoType = KillDetailInfoType.Info_Type_None; PoolObjHandle <ActorRoot> killer = detail.Killer; PoolObjHandle <ActorRoot> victim = detail.Victim; bool flag = false; bool flag2 = false; bool flag3 = false; if (killer) { flag = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ); flag2 = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster); flag3 = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero); } KillInfo result = default(KillInfo); result.KillerImgSrc = (result.VictimImgSrc = string.Empty); result.MsgType = detail.Type; result.bPlayerSelf_KillOrKilled = detail.bPlayerSelf_KillOrKilled; result.actorType = ((!killer) ? ActorTypeDef.Invalid : killer.get_handle().TheActorMeta.ActorType); result.bSrcAllies = detail.bSelfCamp; result.assistImgSrc = new string[4]; if (flag2) { result.KillerImgSrc = KillNotify.monster_icon; } if (flag) { result.KillerImgSrc = KillNotify.building_icon; } if (flag3) { result.KillerImgSrc = KillNotifyUT.GetHero_Icon(detail.Killer, false); } if (killer) { if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ) { result.KillerImgSrc = KillNotify.building_icon; } if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) { MonsterWrapper monsterWrapper = killer.get_handle().AsMonster(); if (killer.get_handle().TheActorMeta.ConfigId == Singleton <BattleLogic> .get_instance().DragonId) { result.KillerImgSrc = KillNotify.dragon_icon; } else if (monsterWrapper.cfgInfo != null && monsterWrapper.cfgInfo.bMonsterType == 2) { result.KillerImgSrc = KillNotify.yeguai_icon; } else { result.KillerImgSrc = KillNotify.monster_icon; } } if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { result.KillerImgSrc = KillNotifyUT.GetHero_Icon(killer, false); } } if (victim) { if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { result.VictimImgSrc = KillNotifyUT.GetHero_Icon(victim, false); } if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ) { result.VictimImgSrc = KillNotify.building_icon; } if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster && victim.get_handle().TheActorMeta.ConfigId == Singleton <BattleLogic> .get_instance().DragonId) { result.VictimImgSrc = KillNotify.dragon_icon; } } if (detail.assistList != null && result.assistImgSrc != null) { for (int i = 0; i < detail.assistList.get_Count(); i++) { uint num = detail.assistList.get_Item(i); for (int j = 0; j < Singleton <GameObjMgr> .get_instance().HeroActors.get_Count(); j++) { if (num == Singleton <GameObjMgr> .get_instance().HeroActors.get_Item(j).get_handle().ObjID) { result.assistImgSrc[i] = KillNotifyUT.GetHero_Icon(Singleton <GameObjMgr> .get_instance().HeroActors.get_Item(j), false); } } } } if (detail.Type == KillDetailInfoType.Info_Type_Soldier_Boosted) { result.KillerImgSrc = ((!detail.bSelfCamp) ? KillNotify.red_soldier_icon : KillNotify.blue_soldier_icon); return(result); } if (detail.Type == KillDetailInfoType.Info_Type_Reconnect || detail.Type == KillDetailInfoType.Info_Type_RunningMan) { result.VictimImgSrc = string.Empty; return(result); } if (detail.HeroMultiKillType != killDetailInfoType) { result.MsgType = detail.HeroMultiKillType; return(result); } if (detail.Type == KillDetailInfoType.Info_Type_StopMultiKill) { return(result); } if (detail.Type == KillDetailInfoType.Info_Type_First_Kill) { return(result); } if (detail.Type == KillDetailInfoType.Info_Type_DestroyTower) { return(result); } if (detail.Type == KillDetailInfoType.Info_Type_Kill_3V3_Dragon || detail.Type == KillDetailInfoType.Info_Type_Kill_5V5_SmallDragon || detail.Type == KillDetailInfoType.Info_Type_Kill_5V5_BigDragon) { if (flag2) { result.KillerImgSrc = KillNotify.monster_icon; } if (flag) { result.KillerImgSrc = KillNotify.building_icon; } if (flag3) { result.KillerImgSrc = KillNotifyUT.GetHero_Icon(detail.Killer, false); } result.bSrcAllies = detail.bSelfCamp; return(result); } if (detail.bAllDead) { result.MsgType = KillDetailInfoType.Info_Type_AllDead; return(result); } if (detail.HeroContiKillType != killDetailInfoType) { result.MsgType = detail.HeroContiKillType; return(result); } if (detail.Type == KillDetailInfoType.Info_Type_Kill) { return(result); } return(result); }
public static string GetHero_Icon(ref ActorMeta actorMeta, bool bSmall = false) { return(KillNotifyUT.GetHero_Icon((uint)actorMeta.ConfigId, 0u, bSmall)); }