private void onSpecialEvent(NetIncomingMessage a_msg) { eSpecialEvent a_event = (eSpecialEvent)a_msg.ReadByte(); if (IsSpawned()) { m_players[m_myOnlineId].OnSpecialEvent(a_event); } DebugLogReadWriteMismatch(a_msg, "onSpecialEvent"); }
public void OnSpecialEvent(eSpecialEvent a_event) { string text = string.Empty; Vector3 position = Vector3.zero; switch (a_event) { case eSpecialEvent.itemBroke: UnityEngine.Object.Instantiate(this.m_weaponBreakEffect, base.transform.position + Vector3.up * 1.5f + base.transform.forward, Quaternion.identity); break; case eSpecialEvent.empty: case eSpecialEvent.forbidden: case eSpecialEvent.fishingfail: case eSpecialEvent.tooManyMissions: case eSpecialEvent.alreadyGotMission: case eSpecialEvent.noAmmo: case eSpecialEvent.carExitsBlocked: case eSpecialEvent.cantHurtSaints: case eSpecialEvent.buildingRepaired: position = base.transform.position + Vector3.up * 3f; text = "EVENT_" + (int)a_event; break; case eSpecialEvent.missionComplete: UnityEngine.Object.Instantiate(this.m_missionCompleteEffect, base.transform.position + Vector3.up * 4f, Quaternion.identity); if (this.m_isOwnPlayer && Global.isSteamActive) { this.m_waitForResult = SteamInventory.TriggerItemDrop(out this.m_itemDropHandle, (SteamItemDef_t)100); } break; } if (string.Empty != text) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(this.m_textEffect, position, Quaternion.identity); TextLNG component = gameObject.GetComponent <TextLNG>(); component.m_lngKey = text; } }