private void RequestChatLog(int channel = 0, ChatWindow.SelectChatTab select = ChatWindow.SelectChatTab.World) { int channel1 = channel; int pinID = 40; if (select == ChatWindow.SelectChatTab.Offical) { pinID = 41; } switch (select - (byte)1) { case ChatWindow.SelectChatTab.Message: this.mRequesting = true; break; default: int start_id = 0; int limit = 30; int exclude_id = this.mLastMessageID >= 0 ? this.mLastMessageID : 0; FlowNode_ReqChatMessage component = (FlowNode_ReqChatMessage)((Component)this).get_gameObject().GetComponent <FlowNode_ReqChatMessage>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.SetChatMessageinfo(channel1, start_id, limit, exclude_id); this.mRequesting = true; break; } break; } if (!this.mRequesting) { return; } FlowNode_GameObject.ActivateOutputLinks((Component)this, pinID); }
private void Start() { this.gm = MonoSingleton <GameManager> .Instance; if ((this.mChatInspectionMaster == null || this.mChatInspectionMaster.Count <= 0) && !this.SetupInspectionMaster()) { DebugUtility.LogError("ChatWindow Error:Failed Load InspectionMaster!"); } else if (!this.SetupChatChannelMaster()) { DebugUtility.LogError("ChatWindow Error:Failed Load ChatChannelMaster!"); } else { this.mCurrentChatTab = ChatWindow.SelectChatTab.World; this.mItems.Clear(); this.mItems = new List <GameObject>((int)this.MaxChatLogItem); for (int index = 0; index < (int)this.MaxChatLogItem; ++index) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.MessageTemplate); gameObject.get_transform().SetParent(this.MessageRoot.get_transform(), false); this.mItems.Add(gameObject); } this.mState = new StateMachine <ChatWindow>(this); this.mState.GotoState <ChatWindow.State_Init>(); } }