Ejemplo n.º 1
0
 public Injury(InjuryType type, InjuryPlace place, BIWoundSlot slot, InjuryState state, int poison_level = 0, Injury parent_injury = null)
 {
     this.m_Type  = type;
     this.m_Place = place;
     slot.SetInjury(this);
     this.m_Slot = slot;
     this.m_StartTimeInMinutes = MainLevel.Instance.GetCurrentTimeMinutes();
     this.m_PoisonLevel        = poison_level;
     this.m_TimeToInfect       = this.m_DefaultTimeToInfect;
     this.m_ParentInjury       = parent_injury;
     if (type == InjuryType.VenomBite || type == InjuryType.SnakeBite)
     {
         Player.Get().GetComponent <PlayerDiseasesModule>().RequestDisease(ConsumeEffect.Fever, 0f, 1);
     }
     this.m_State = state;
     this.UpdateHealthDecreasePerSec();
     this.SetWoundMaterial(this.m_Slot.m_Wound);
     if (slot.m_AdditionalMeshes != null)
     {
         for (int i = 0; i < slot.m_AdditionalMeshes.Count; i++)
         {
             this.SetWoundMaterial(slot.m_AdditionalMeshes[i]);
         }
     }
     this.SetAdditionalInjury(this);
     Injury.s_NumInjuries++;
 }
Ejemplo n.º 2
0
 public Injury(InjuryType type, InjuryPlace place, BIWoundSlot slot, InjuryState state, int poison_level = 0, Injury parent_injury = null, DamageInfo damage_info = null)
 {
     this.m_Type  = type;
     this.m_Place = place;
     slot.SetInjury(this);
     this.m_Slot = slot;
     this.m_StartTimeInMinutes = MainLevel.Instance.GetCurrentTimeMinutes();
     this.m_PoisonLevel        = poison_level;
     this.m_TimeToInfect       = this.m_DefaultTimeToInfect;
     this.m_ParentInjury       = parent_injury;
     if (damage_info != null && damage_info.m_Damager != null)
     {
         AI component = damage_info.m_Damager.GetComponent <AI>();
         if (component != null)
         {
             this.m_AIDamager = component.m_ID;
         }
     }
     this.m_State = state;
     this.UpdateHealthDecreasePerSec();
     this.SetWoundMaterial(this.m_Slot.m_Wound);
     if (slot.m_AdditionalMeshes != null)
     {
         for (int i = 0; i < slot.m_AdditionalMeshes.Count; i++)
         {
             this.SetWoundMaterial(slot.m_AdditionalMeshes[i]);
         }
     }
     this.SetAdditionalInjury(this);
     Injury.s_NumInjuries++;
 }