namespace Holo.Virtual.Users { using Holo; using Holo.Managers; using Holo.Virtual.Rooms; using System; using System.Collections; using System.Runtime.CompilerServices; using System.Threading; public class virtualRoomUserStatusManager { private int ᙅ; private int 4AAAA; private Hashtable 5AAA1; private Thread 6AAAA; public virtualRoomUserStatusManager(int userID, int roomID) { this.ᙅ = userID; this.4AAAA = roomID; this.5AAA1 = new Hashtable(); } internal void addStatus(string Key, string Value) { if (this.5AAA1.ContainsKey(Key)) { this.5AAA1.Remove(Key); } this.5AAA1.Add(Key, Value); } internal void carryItem(string Item) { this.dropCarrydItem(); this.5AAA1.Remove("dance"); this.6AAAA = new Thread(new ParameterizedThreadStart(this.itemCarrierLoop)); this.6AAAA.Priority = ThreadPriority.Lowest; this.6AAAA.Start(Item); } internal void Clear() { try { this.6AAAA.Abort(); this.5AAA1.Clear(); this.5AAA1 = null; } catch { } } internal bool containsStatus(string Key) { return this.5AAA1.ContainsKey(Key); } internal void dropCarrydItem() { if ((this.6AAAA != null) && this.6AAAA.IsAlive) { this.6AAAA.Abort(); } this.removeStatus("carryd"); this.removeStatus("drink"); } internal void handleStatus(string Key, string Value, int Length) { if (this.5AAA1.ContainsKey(Key)) { this.5AAA1.Remove(Key); } new ᙃ(this.HANDLESTATUS).BeginInvoke(Key, Value, Length, null, null); } private void HANDLESTATUS(string Key, string Value, int Length) { try { this.5AAA1.Add(Key, Value); this.roomUser.Refresh(); Thread.Sleep(Length); this.5AAA1.Remove(Key); this.roomUser.Refresh(); } catch { } } private void itemCarrierLoop(object s) { string str = (string) s; for (int i = 1; i <= Config.Statuses_itemCarrying_SipAmount; i++) { this.addStatus("carryd", str); this.roomUser.Refresh(); Thread.Sleep(Config.Statuses_itemCarrying_SipInterval); this.5AAA1.Remove("carryd"); this.addStatus("drink", str); this.roomUser.Refresh(); Thread.Sleep(Config.Statuses_itemCarrying_SipDuration); this.5AAA1.Remove("drink"); } this.roomUser.Refresh(); } internal void Refresh() { this.roomUser.Refresh(); } internal void removeStatus(string Key) { try { if (this.5AAA1.ContainsKey(Key)) { this.5AAA1.Remove(Key); } } catch { } } internal void showGesture(string theGesture, int timeToShow) { new ᙄ(this.HANDLESTATUS).BeginInvoke("gest", theGesture, timeToShow, null, null); } internal void showTalkAnimation(int talkTime, string talkGesture) { new ᙄ(this.HANDLESTATUS).BeginInvoke("talk", null, talkTime, null, null); if (talkGesture != null) { this.showGesture(talkGesture, talkTime + 0xbb8); } } public override string ToString() { string str = ""; foreach (string str2 in this.5AAA1.Keys) { str = str + str2; string str3 = (string) this.5AAA1[str2]; if (str3 != "") { str = str + " " + str3; } str = str + "/"; } return str; } private virtualRoom Room { get { return roomManager.getRoom(this.4AAAA); } } private virtualRoomUser roomUser { get { return userManager.getUser(this.ᙅ).roomUser; } } private virtualUser User { get { return userManager.getUser(this.ᙅ); } } private delegate void ᙄ(string Key, string Value, int Length); private delegate void ᙃ(string Key, string Value, int Length); } }