// Token: 0x060018FC RID: 6396 RVA: 0x00077EF8 File Offset: 0x000760F8 private void ProcessHits(List <OverlapAttack.OverlapInfo> hitList) { if (hitList.Count == 0) { return; } for (int i = 0; i < hitList.Count; i++) { OverlapAttack.OverlapInfo overlapInfo = hitList[i]; if (this.hitEffectPrefab) { EffectManager.instance.SimpleImpactEffect(this.hitEffectPrefab, overlapInfo.hitPosition, -hitList[i].pushDirection, true); } SurfaceDefProvider component = hitList[i].hurtBox.GetComponent <SurfaceDefProvider>(); if (component && component.surfaceDef) { SurfaceDef objectSurfaceDef = SurfaceDefProvider.GetObjectSurfaceDef(hitList[i].hurtBox.collider, hitList[i].hitPosition); if (objectSurfaceDef) { if (objectSurfaceDef.impactEffectPrefab) { EffectManager.instance.SpawnEffect(objectSurfaceDef.impactEffectPrefab, new EffectData { origin = overlapInfo.hitPosition, rotation = ((overlapInfo.pushDirection == Vector3.zero) ? Quaternion.identity : Util.QuaternionSafeLookRotation(overlapInfo.pushDirection)), color = objectSurfaceDef.approximateColor, scale = 2f }, true); } if (objectSurfaceDef.impactSoundString != null && objectSurfaceDef.impactSoundString.Length != 0) { Util.PlaySound(objectSurfaceDef.impactSoundString, hitList[i].hurtBox.gameObject); } } } } if (NetworkServer.active) { OverlapAttack.PerformDamage(this.attacker, this.inflictor, this.damage, this.isCrit, this.procChainMask, this.procCoefficient, this.damageColorIndex, this.damageType, this.forceVector, this.pushAwayForce, hitList); return; } OverlapAttack.outgoingMessage.attacker = this.attacker; OverlapAttack.outgoingMessage.inflictor = this.inflictor; OverlapAttack.outgoingMessage.damage = this.damage; OverlapAttack.outgoingMessage.isCrit = this.isCrit; OverlapAttack.outgoingMessage.procChainMask = this.procChainMask; OverlapAttack.outgoingMessage.procCoefficient = this.procCoefficient; OverlapAttack.outgoingMessage.damageColorIndex = this.damageColorIndex; OverlapAttack.outgoingMessage.damageType = this.damageType; OverlapAttack.outgoingMessage.forceVector = this.forceVector; OverlapAttack.outgoingMessage.pushAwayForce = this.pushAwayForce; Util.CopyList <OverlapAttack.OverlapInfo>(hitList, OverlapAttack.outgoingMessage.overlapInfoList); GameNetworkManager.singleton.client.connection.SendByChannel(71, OverlapAttack.outgoingMessage, QosChannelIndex.defaultReliable.intVal); }
public static void HandleOverlapAttackHits(NetworkMessage netMsg) { netMsg.ReadMessage <OverlapAttack.OverlapAttackMessage>(OverlapAttack.incomingMessage); OverlapAttack.PerformDamage(OverlapAttack.incomingMessage.attacker, OverlapAttack.incomingMessage.inflictor, OverlapAttack.incomingMessage.damage, OverlapAttack.incomingMessage.isCrit, OverlapAttack.incomingMessage.procChainMask, OverlapAttack.incomingMessage.procCoefficient, OverlapAttack.incomingMessage.damageColorIndex, OverlapAttack.incomingMessage.damageType, OverlapAttack.incomingMessage.forceVector, OverlapAttack.incomingMessage.pushAwayForce, OverlapAttack.incomingMessage.overlapInfoList); }