Esempio n. 1
0
 public override void SetAttacker(Character attacker)
 {
     ZLog.Log("Setting attacker " + attacker.m_name);
     m_attacker = attacker;
     m_time     = 0f;
     if (Vector3.Distance(m_attacker.transform.position, m_character.transform.position) > m_maxDistance)
     {
         m_attacker.Message(MessageHud.MessageType.Center, "Target too far");
         m_broken = true;
         return;
     }
     m_attacker.Message(MessageHud.MessageType.Center, m_character.m_name + " Grappled");
     GameObject[] startEffectInstances = m_startEffectInstances;
     foreach (GameObject gameObject in startEffectInstances)
     {
         if ((bool)gameObject)
         {
             LineConnect component = gameObject.GetComponent <LineConnect>();
             if ((bool)component)
             {
                 component.SetPeer(m_attacker.GetComponent <ZNetView>());
             }
         }
     }
 }
Esempio n. 2
0
    // Token: 0x06000305 RID: 773 RVA: 0x00019B74 File Offset: 0x00017D74
    public void Setup(Character owner, Vector3 velocity, float hitNoise, HitData hitData, ItemDrop.ItemData item)
    {
        this.m_owner = owner;
        this.m_vel   = velocity;
        if (hitNoise >= 0f)
        {
            this.m_hitNoise = hitNoise;
        }
        if (hitData != null)
        {
            this.m_damage        = hitData.m_damage;
            this.m_blockable     = hitData.m_blockable;
            this.m_dodgeable     = hitData.m_dodgeable;
            this.m_attackForce   = hitData.m_pushForce;
            this.m_backstabBonus = hitData.m_backstabBonus;
            this.m_statusEffect  = hitData.m_statusEffect;
            this.m_skill         = hitData.m_skill;
        }
        if (this.m_respawnItemOnHit)
        {
            this.m_spawnItem = item;
        }
        LineConnect component = base.GetComponent <LineConnect>();

        if (component)
        {
            component.SetPeer(owner.GetZDOID());
        }
    }
Esempio n. 3
0
 // Token: 0x060003AD RID: 941 RVA: 0x0001F45C File Offset: 0x0001D65C
 public override void SetAttacker(Character attacker)
 {
     ZLog.Log("Setting attacker " + attacker.m_name);
     this.m_attacker = attacker;
     this.m_time     = 0f;
     if (this.m_character.IsBoss())
     {
         this.m_broken = true;
         return;
     }
     if (Vector3.Distance(this.m_attacker.transform.position, this.m_character.transform.position) > this.m_maxDistance)
     {
         this.m_attacker.Message(MessageHud.MessageType.Center, "Target too far", 0, null);
         this.m_broken = true;
         return;
     }
     this.m_attacker.Message(MessageHud.MessageType.Center, this.m_character.m_name + " harpooned", 0, null);
     foreach (GameObject gameObject in this.m_startEffectInstances)
     {
         if (gameObject)
         {
             LineConnect component = gameObject.GetComponent <LineConnect>();
             if (component)
             {
                 component.SetPeer(this.m_attacker.GetComponent <ZNetView>());
             }
         }
     }
 }