private void requestOidnPosition() { if (NpcManager.Root.transform.position == Vector3.zero) { LocationManager.GetStartPos(); return; } DBG.blogInfo("Client Stop Request odin position"); CancelInvoke("requestOidnPosition"); }
private static void Prefix(Chat __instance) { if (Player.m_localPlayer != null && OdinPlus.isNPCInit) { string cmd = __instance.m_input.text; if (cmd.ToLower() == "/odinhere") { if (Set_FOP) { LocationManager.GetStartPos(); return; } NpcManager.Root.transform.localPosition = Player.m_localPlayer.transform.localPosition + Vector3.forward * 4; } if (cmd.ToLower() == "/whereami") { var pos = Player.m_localPlayer.transform.position; string s = pos.x + "," + pos.y + "," + pos.z; DBG.InfoCT(s); DBG.cprt(s); //global::Console.instance.m_input.text=s; __instance.m_input.text = s; return; } if (cmd.ToLower() == "/whereodin") { var pos = NpcManager.Root.transform.localPosition; string s = pos.x + "," + pos.y + "," + pos.z; DBG.InfoCT(s); DBG.cprt(s); __instance.m_input.text = s; return; } if (cmd.ToLower() == "/setodin") { CFG_OdinPosition.Value = NpcManager.Root.transform.localPosition; return; } if (cmd.ToLower() == "/findfarm") { Game.instance.DiscoverClosestLocation("WoodFarm1", Player.m_localPlayer.transform.position, "Village", 0); return; } } }