public Msg_EmoticonIndicate( body_SC_CHAT_EMOTICON_RESULT _result) { m_MessageType = eMessageType.EMOTICON_INDICATION; index_ = _result.nIndex; }
public void Recv_Emoticon( body_SC_CHAT_EMOTICON_RESULT _result) { if( _result.eResult == eRESULTCODE.eRESULT_SUCC) { if( AsSocialManager.Instance.SocialData.GetBlockOut( _result.nUserUniqKey) != null) { Debug.Log( "AsEmotionManager::Recv_Emoticon: blocked out user[" + _result.nUserUniqKey + "]"); return; } // Msg_EmoticonIndicate emoticon = new Msg_EmoticonIndicate( _result); // AsEntityManager.Instance.DispatchMessageByUniqueKey( _result.nCharUniqKey, emoticon); AsUserEntity entity = AsEntityManager.Instance.GetUserEntityByUniqueId( _result.nCharUniqKey); eGENDER gender = entity.GetProperty<eGENDER>( eComponentProperty.GENDER); Tbl_Emoticon_Record record = AsTableManager.Instance.GetTbl_Emoticon_Record( _result.nIndex); string chat = AsTableManager.Instance.GetTbl_String(record.GetRandomString( gender)); // Debug.LogWarning("AsEmotionManager::Recv_Emoticon: _result.nIndex = " + _result.nIndex); // Debug.LogWarning("AsEmotionManager::Recv_Emoticon: chat = " + chat); string name = "[" + AsUtil.GetRealString( System.Text.Encoding.UTF8.GetString( _result.szCharName)) + "]:";// "[Unknown_Player]:"; // if( entity != null) name = "[" + entity.GetProperty<string>( eComponentProperty.NAME) + "]:"; switch( _result.eFilter) { case AsEmotionManager.eCHAT_FILTER.eCHAT_FILTER_LOCAL: AsChatManager.Instance.ShowChatBalloon( _result.nCharUniqKey, chat, eCHATTYPE.eCHATTYPE_PUBLIC); AsChatManager.Instance.InsertChat( name + chat, eCHATTYPE.eCHATTYPE_PUBLIC); break; case AsEmotionManager.eCHAT_FILTER.eCHAT_FILTER_PARTY: AsChatManager.Instance.ShowChatBalloon( _result.nCharUniqKey, chat, eCHATTYPE.eCHATTYPE_PARTY); AsChatManager.Instance.InsertChat( name + chat, eCHATTYPE.eCHATTYPE_PARTY); break; case AsEmotionManager.eCHAT_FILTER.eCHAT_FILTER_GUILD: AsChatManager.Instance.ShowChatBalloon( _result.nCharUniqKey, chat, eCHATTYPE.eCHATTYPE_GUILD); AsChatManager.Instance.InsertChat( name + chat, eCHATTYPE.eCHATTYPE_GUILD); break; } #region - exceptional case - Debug.Log( "AsEmotionManager::Recv_Emoticon: record.Index = " + record.Index); switch( record.Index) { case 21: entity.HandleMessage( new Msg_Emoticon_Seat_Indicate( record)); break; } #endregion QuestMessageBroadCaster.BrocastQuest( QuestMessages.QM_USE_CHAT_MACRO, new AchUseEmoticon( _result.nIndex, 1)); } else { if( eRESULTCODE.eRESULT_FAIL_CHAT_NOTHING_PARTY == _result.eResult) AsChatManager.Instance.InsertChat( AsTableManager.Instance.GetTbl_String(1477), eCHATTYPE.eCHATTYPE_SYSTEM); else if( eRESULTCODE.eRESULT_FAIL_CHAT_NOTHING_GUILD == _result.eResult) AsChatManager.Instance.InsertChat( AsTableManager.Instance.GetTbl_String(1478), eCHATTYPE.eCHATTYPE_SYSTEM); else Debug.LogWarning( "AsEmotionManager::EmoticonProcess: result is " + _result.eResult); } }
void ChatEmoticonResult( byte[] _packet) { Debug.Log( "AsCommonProcess::ChatEmoticonResult: began"); body_SC_CHAT_EMOTICON_RESULT result = new body_SC_CHAT_EMOTICON_RESULT(); result.PacketBytesToClass( _packet); AsEmotionManager.Instance.Recv_Emoticon(result); }