Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.43 KB | None | 0 0
  1. using System;
  2. using System.Data;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Collections.Concurrent;
  6.  
  7. using log4net;
  8.  
  9. using Plus.Core;
  10. using Plus.HabboHotel.Rooms;
  11. using Plus.HabboHotel.Groups;
  12. using Plus.HabboHotel.GameClients;
  13. using Plus.HabboHotel.Achievements;
  14. using Plus.HabboHotel.Users.Badges;
  15. using Plus.HabboHotel.Users.Inventory;
  16. using Plus.HabboHotel.Users.Messenger;
  17. using Plus.HabboHotel.Users.Relationships;
  18. using Plus.HabboHotel.Users.UserDataManagement;
  19.  
  20. using Plus.HabboHotel.Users.Process;
  21. using Plus.Communication.Packets.Outgoing.Inventory.Purse;
  22.  
  23.  
  24. using Plus.HabboHotel.Users.Navigator.SavedSearches;
  25. using Plus.HabboHotel.Users.Effects;
  26. using Plus.HabboHotel.Users.Messenger.FriendBar;
  27. using Plus.HabboHotel.Users.Clothing;
  28. using Plus.Communication.Packets.Outgoing.Navigator;
  29. using Plus.Communication.Packets.Outgoing.Rooms.Engine;
  30. using Plus.Communication.Packets.Outgoing.Rooms.Session;
  31. using Plus.Communication.Packets.Outgoing.Handshake;
  32. using Plus.Database.Interfaces;
  33. using Plus.HabboHotel.Rooms.Chat.Commands;
  34. using Plus.HabboHotel.Users.Permissions;
  35. using Plus.HabboHotel.Subscriptions;
  36. using Plus.HabboHotel.Users.Calendar;
  37.  
  38. namespace Plus.HabboHotel.Users
  39. {
  40. public enum KickWarsstate { OnRedTeam, OnBlueTeam, Start, End, Exit, None };
  41.  
  42. public class Habbo
  43. {
  44. private static readonly ILog log = LogManager.GetLogger("Plus.HabboHotel.Users");
  45.  
  46. public KickWarsstate KickWarsState = KickWarsstate.None;
  47. public bool KickWarsKicked = false;
  48. //Generic player values.
  49. private int _id;
  50. private string _username;
  51. private int _rank;
  52. private string _motto;
  53. private string _look;
  54. private string _gender;
  55. private string _footballLook;
  56. private string _footballGender;
  57. private int _credits;
  58. private int _duckets;
  59. private int _diamonds;
  60. private int _gotwPoints;
  61. private int _homeRoom;
  62. private double _lastOnline;
  63. private double _accountCreated;
  64. private List<int> _clientVolume;
  65. private double _lastNameChange;
  66. private string _machineId;
  67. private bool _chatPreference;
  68. private bool _focusPreference;
  69. private bool _isExpert;
  70. private int _vipRank;
  71.  
  72. //Abilitys triggered by generic events.
  73. private bool _appearOffline;
  74. private bool _allowTradingRequests;
  75. private bool _allowUserFollowing;
  76. private bool _allowFriendRequests;
  77. private bool _allowMessengerInvites;
  78. private bool _allowPetSpeech;
  79. private bool _allowBotSpeech;
  80. private bool _allowPublicRoomStatus;
  81. private bool _allowConsoleMessages;
  82. private bool _allowGifts;
  83. private bool _allowMimic;
  84. private bool _receiveWhispers;
  85. private bool _ignorePublicWhispers;
  86. private bool _playingFastFood;
  87. private FriendBarState _friendbarState;
  88. private int _christmasDay;
  89. private int _wantsToRideHorse;
  90. private int _timeAFK;
  91. private bool _disableForcedEffects;
  92.  
  93. //Player saving.
  94. private bool _disconnected;
  95. private bool _habboSaved;
  96. private bool _changingName;
  97.  
  98. //Counters
  99. private double _floodTime;
  100. private int _friendCount;
  101. private double _timeMuted;
  102. private double _tradingLockExpiry;
  103. private int _bannedPhraseCount;
  104. private double _sessionStart;
  105. private int _messengerSpamCount;
  106. private double _messengerSpamTime;
  107. private int _creditsTickUpdate;
  108. private int _diamondsTickUpdate;
  109.  
  110. //Room related
  111. private int _tentId;
  112. private int _hopperId;
  113. private bool _isHopping;
  114. private int _teleportId;
  115. private bool _isTeleporting;
  116. private int _teleportingRoomId;
  117. private bool _roomAuthOk;
  118. private int _currentRoomId;
  119.  
  120. //Advertising reporting system.
  121. private bool _hasSpoken;
  122. private bool _advertisingReported;
  123. private double _lastAdvertiseReport;
  124. private bool _advertisingReportBlocked;
  125.  
  126. //Values generated within the game.
  127. private bool _wiredInteraction;
  128. private int _questLastCompleted;
  129. private bool _inventoryAlert;
  130. private bool _ignoreBobbaFilter;
  131. private bool _wiredTeleporting;
  132. private int _customBubbleId;
  133. private int _tempInt;
  134. private bool _onHelperDuty;
  135.  
  136. public int diceSum = 0;
  137.  
  138. //Fastfood
  139. private int _fastfoodScore;
  140.  
  141. //Just random fun stuff.
  142. private int _petId;
  143.  
  144. //Anti-script placeholders.
  145. private DateTime _lastGiftPurchaseTime;
  146. private DateTime _lastMottoUpdateTime;
  147. private DateTime _lastClothingUpdateTime;
  148. private DateTime _lastForumMessageUpdateTime;
  149.  
  150. private int _giftPurchasingWarnings;
  151. private int _mottoUpdateWarnings;
  152. private int _clothingUpdateWarnings;
  153.  
  154. private bool _sessionGiftBlocked;
  155. private bool _sessionMottoBlocked;
  156. private bool _sessionClothingBlocked;
  157.  
  158. public List<int> RatedRooms;
  159. public List<int> MutedUsers;
  160. public List<RoomData> UsersRooms;
  161.  
  162. private GameClient _client;
  163. private HabboStats _habboStats;
  164. private HabboMessenger Messenger;
  165. private ProcessComponent _process;
  166. public ArrayList FavoriteRooms;
  167. public Dictionary<int, int> quests;
  168. private BadgeComponent BadgeComponent;
  169. private InventoryComponent InventoryComponent;
  170. public Dictionary<int, Relationship> Relationships;
  171. public ConcurrentDictionary<string, UserAchievement> Achievements;
  172.  
  173. private DateTime _timeCached;
  174.  
  175. private SearchesComponent _navigatorSearches;
  176. private EffectsComponent _fx;
  177. private ClothingComponent _clothing;
  178. private PermissionComponent _permissions;
  179.  
  180. public int dailytrust = 0;
  181. public bool isOfficer = false;
  182. public bool twentyone = false;
  183. public bool six = false;
  184. public bool isLoggedIn = false;
  185. public int count = 0;
  186. public bool hasJoined = false;
  187.  
  188. private IChatCommand _iChatCommand;
  189.  
  190. public Habbo(int Id, string Username, int Rank, string Motto, string Look, string Gender, int Credits, int ActivityPoints, int HomeRoom,
  191. bool HasFriendRequestsDisabled, int LastOnline, bool AppearOffline, bool HideInRoom, double CreateDate, int Diamonds,
  192. string machineID, string clientVolume, bool ChatPreference, bool FocusPreference, bool PetsMuted, bool BotsMuted, bool AdvertisingReportBlocked, double LastNameChange,
  193. int GOTWPoints, bool IgnoreInvites, double TimeMuted, double TradingLock, bool AllowGifts, int FriendBarState, bool DisableForcedEffects, bool AllowMimic, int VIPRank)
  194. {
  195. this._id = Id;
  196. this._username = Username;
  197. this._rank = Rank;
  198. this._motto = Motto;
  199. this._look = PlusEnvironment.GetGame().GetAntiMutant().RunLook(Look);
  200. this._gender = Gender.ToLower();
  201. this._footballLook = PlusEnvironment.FilterFigure(Look.ToLower());
  202. this._footballGender = Gender.ToLower();
  203. this._credits = Credits;
  204. this._duckets = ActivityPoints;
  205. this._diamonds = Diamonds;
  206. this._gotwPoints = GOTWPoints;
  207. this._homeRoom = HomeRoom;
  208. this._lastOnline = LastOnline;
  209. this._accountCreated = CreateDate;
  210. this._clientVolume = new List<int>();
  211. foreach (string Str in clientVolume.Split(','))
  212. {
  213. int Val = 0;
  214. if (int.TryParse(Str, out Val))
  215. this._clientVolume.Add(int.Parse(Str));
  216. else
  217. this._clientVolume.Add(100);
  218. }
  219.  
  220. this._lastNameChange = LastNameChange;
  221. this._machineId = machineID;
  222. this._chatPreference = ChatPreference;
  223. this._focusPreference = FocusPreference;
  224. this._isExpert = IsExpert == true;
  225.  
  226. this._appearOffline = AppearOffline;
  227. this._allowTradingRequests = true;//TODO
  228. this._allowUserFollowing = true;//TODO
  229. this._allowFriendRequests = HasFriendRequestsDisabled;//TODO
  230. this._allowMessengerInvites = IgnoreInvites;
  231. this._allowPetSpeech = PetsMuted;
  232. this._allowBotSpeech = BotsMuted;
  233. this._allowPublicRoomStatus = HideInRoom;
  234. this._allowConsoleMessages = true;
  235. this._allowGifts = AllowGifts;
  236. this._allowMimic = AllowMimic;
  237. this._receiveWhispers = true;
  238. this._ignorePublicWhispers = false;
  239. this._playingFastFood = false;
  240. this._friendbarState = FriendBarStateUtility.GetEnum(FriendBarState);
  241. this._christmasDay = ChristmasDay;
  242. this._wantsToRideHorse = 0;
  243. this._timeAFK = 0;
  244. this._disableForcedEffects = DisableForcedEffects;
  245. this._vipRank = VIPRank;
  246.  
  247. this._disconnected = false;
  248. this._habboSaved = false;
  249. this._changingName = false;
  250.  
  251. this._floodTime = 0;
  252. this._friendCount = 0;
  253. this._timeMuted = TimeMuted;
  254. this._timeCached = DateTime.Now;
  255.  
  256. this._tradingLockExpiry = TradingLock;
  257. if (this._tradingLockExpiry > 0 && PlusEnvironment.GetUnixTimestamp() > this.TradingLockExpiry)
  258. {
  259. this._tradingLockExpiry = 0;
  260. using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  261. {
  262. dbClient.RunQuery("UPDATE `user_info` SET `trading_locked` = '0' WHERE `user_id` = '" + Id + "' LIMIT 1");
  263. }
  264. }
  265.  
  266. this._bannedPhraseCount = 0;
  267. this._sessionStart = PlusEnvironment.GetUnixTimestamp();
  268. this._messengerSpamCount = 0;
  269. this._messengerSpamTime = 0;
  270. this._creditsTickUpdate = PlusStaticGameSettings.UserCreditsUpdateTimer;
  271. this._diamondsTickUpdate = PlusStaticGameSettings.UserDiamondsUpdateTimer;
  272.  
  273. this._tentId = 0;
  274. this._hopperId = 0;
  275. this._isHopping = false;
  276. this._teleportId = 0;
  277. this._isTeleporting = false;
  278. this._teleportingRoomId = 0;
  279. this._roomAuthOk = false;
  280. this._currentRoomId = 0;
  281.  
  282. this._hasSpoken = false;
  283. this._lastAdvertiseReport = 0;
  284. this._advertisingReported = false;
  285. this._advertisingReportBlocked = AdvertisingReportBlocked;
  286.  
  287. this._wiredInteraction = false;
  288. this._questLastCompleted = 0;
  289. this._inventoryAlert = false;
  290. this._ignoreBobbaFilter = false;
  291. this._wiredTeleporting = false;
  292. this._customBubbleId = 0;
  293. this._onHelperDuty = false;
  294. this._fastfoodScore = 0;
  295. this._petId = 0;
  296. this._tempInt = 0;
  297.  
  298. this._lastGiftPurchaseTime = DateTime.Now;
  299. this._lastMottoUpdateTime = DateTime.Now;
  300. this._lastClothingUpdateTime = DateTime.Now;
  301. this._lastForumMessageUpdateTime = DateTime.Now;
  302.  
  303. this._giftPurchasingWarnings = 0;
  304. this._mottoUpdateWarnings = 0;
  305. this._clothingUpdateWarnings = 0;
  306.  
  307. this._sessionGiftBlocked = false;
  308. this._sessionMottoBlocked = false;
  309. this._sessionClothingBlocked = false;
  310.  
  311. this.FavoriteRooms = new ArrayList();
  312. this.MutedUsers = new List<int>();
  313. this.Achievements = new ConcurrentDictionary<string, UserAchievement>();
  314. this.Relationships = new Dictionary<int, Relationship>();
  315. this.RatedRooms = new List<int>();
  316. this.UsersRooms = new List<RoomData>();
  317.  
  318. //TODO: Nope.
  319. this.InitPermissions();
  320.  
  321. #region Stats
  322. DataRow StatRow = null;
  323. using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  324. {
  325. dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
  326. dbClient.AddParameter("user_id", Id);
  327. StatRow = dbClient.getRow();
  328.  
  329. if (StatRow == null)//No row, add it yo
  330. {
  331. dbClient.RunQuery("INSERT INTO `user_stats` (`id`) VALUES ('" + Id + "')");
  332. dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts`, `dailytrusted`, `dailytruststamp` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
  333. dbClient.AddParameter("user_id", Id);
  334. StatRow = dbClient.getRow();
  335. }
  336.  
  337. try
  338. {
  339. this._habboStats = new HabboStats(Convert.ToInt32(StatRow["roomvisits"]), Convert.ToDouble(StatRow["onlineTime"]), Convert.ToInt32(StatRow["respect"]), Convert.ToInt32(StatRow["respectGiven"]), Convert.ToInt32(StatRow["giftsGiven"]),
  340. Convert.ToInt32(StatRow["giftsReceived"]), Convert.ToInt32(StatRow["dailyRespectPoints"]), Convert.ToInt32(StatRow["dailyPetRespectPoints"]), Convert.ToInt32(StatRow["AchievementScore"]),
  341. Convert.ToInt32(StatRow["quest_id"]), Convert.ToInt32(StatRow["quest_progress"]), Convert.ToInt32(StatRow["groupid"]), Convert.ToString(StatRow["respectsTimestamp"]), Convert.ToInt32(StatRow["forum_posts"]));
  342.  
  343. if (Convert.ToString(StatRow["respectsTimestamp"]) != DateTime.Today.ToString("MM/dd"))
  344. {
  345. this._habboStats.RespectsTimestamp = DateTime.Today.ToString("MM/dd");
  346. SubscriptionData SubData = null;
  347.  
  348. int DailyRespects = 6;
  349.  
  350. if (this._permissions.HasRight("mod_tool"))
  351. DailyRespects = 10;
  352. else if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(VIPRank, out SubData))
  353. DailyRespects = SubData.Respects;
  354.  
  355. this._habboStats.DailyRespectPoints = DailyRespects;
  356. this._habboStats.DailyPetRespectPoints = DailyRespects;
  357.  
  358. dbClient.RunQuery("UPDATE `user_stats` SET `dailyRespectPoints` = '" + DailyRespects + "', `dailyPetRespectPoints` = '" + DailyRespects + "', `respectsTimestamp` = '" + DateTime.Today.ToString("MM/dd") + "', `dailytrust` = 0 WHERE `id` = '" + Id + "' LIMIT 1");
  359. }
  360. }
  361. catch (Exception e)
  362. {
  363. Logging.LogException(e.ToString());
  364. }
  365. }
  366.  
  367. Group G = null;
  368. if (!PlusEnvironment.GetGame().GetGroupManager().TryGetGroup(this._habboStats.FavouriteGroupId, out G))
  369. this._habboStats.FavouriteGroupId = 0;
  370. #endregion
  371. }
  372.  
  373. public int Id
  374. {
  375. get { return this._id; }
  376. set { this._id = value; }
  377. }
  378.  
  379. public string Username
  380. {
  381. get { return this._username; }
  382. set { this._username = value; }
  383. }
  384.  
  385. public int Rank
  386. {
  387. get { return this._rank; }
  388. set { this._rank = value; }
  389. }
  390.  
  391. public string Motto
  392. {
  393. get { return this._motto; }
  394. set { this._motto = value; }
  395. }
  396.  
  397. public string Look
  398. {
  399. get { return this._look; }
  400. set { this._look = value; }
  401. }
  402.  
  403. public string Gender
  404. {
  405. get { return this._gender; }
  406. set { this._gender = value; }
  407. }
  408.  
  409. public string FootballLook
  410. {
  411. get { return this._footballLook; }
  412. set { this._footballLook = value; }
  413. }
  414.  
  415. public string FootballGender
  416. {
  417. get { return this._footballGender; }
  418. set { this._footballGender = value; }
  419. }
  420.  
  421. public int Credits
  422. {
  423. get { return this._credits; }
  424. set { this._credits = value; }
  425. }
  426.  
  427. public int Duckets
  428. {
  429. get { return this._duckets; }
  430. set { this._duckets = value; }
  431. }
  432.  
  433. public int Diamonds
  434. {
  435. get { return this._diamonds; }
  436. set { this._diamonds = value; }
  437. }
  438.  
  439. public int GOTWPoints
  440. {
  441. get { return this._gotwPoints; }
  442. set { this._gotwPoints = value; }
  443. }
  444.  
  445. public int HomeRoom
  446. {
  447. get { return this._homeRoom; }
  448. set { this._homeRoom = value; }
  449. }
  450.  
  451. public double LastOnline
  452. {
  453. get { return this._lastOnline; }
  454. set { this._lastOnline = value; }
  455. }
  456.  
  457. public double AccountCreated
  458. {
  459. get { return this._accountCreated; }
  460. set { this._accountCreated = value; }
  461. }
  462.  
  463. public List<int> ClientVolume
  464. {
  465. get { return this._clientVolume; }
  466. set { this._clientVolume = value; }
  467. }
  468.  
  469. public double LastNameChange
  470. {
  471. get { return this._lastNameChange; }
  472. set { this._lastNameChange = value; }
  473. }
  474.  
  475. public string MachineId
  476. {
  477. get { return this._machineId; }
  478. set { this._machineId = value; }
  479. }
  480.  
  481. public bool ChatPreference
  482. {
  483. get { return this._chatPreference; }
  484. set { this._chatPreference = value; }
  485. }
  486. public bool FocusPreference
  487. {
  488. get { return this._focusPreference; }
  489. set { this._focusPreference = value; }
  490. }
  491.  
  492. public bool IsExpert
  493. {
  494. get { return this._isExpert; }
  495. set { this._isExpert = value; }
  496. }
  497.  
  498. public bool AppearOffline
  499. {
  500. get { return this._appearOffline; }
  501. set { this._appearOffline = value; }
  502. }
  503.  
  504. public int VIPRank
  505. {
  506. get { return this._vipRank; }
  507. set { this._vipRank = value; }
  508. }
  509.  
  510. public int TempInt
  511. {
  512. get { return this._tempInt; }
  513. set { this._tempInt = value; }
  514. }
  515.  
  516. public bool AllowTradingRequests
  517. {
  518. get { return this._allowTradingRequests; }
  519. set { this._allowTradingRequests = value; }
  520. }
  521.  
  522. public bool AllowUserFollowing
  523. {
  524. get { return this._allowUserFollowing; }
  525. set { this._allowUserFollowing = value; }
  526. }
  527.  
  528. public bool AllowFriendRequests
  529. {
  530. get { return this._allowFriendRequests; }
  531. set { this._allowFriendRequests = value; }
  532. }
  533.  
  534. public bool AllowMessengerInvites
  535. {
  536. get { return this._allowMessengerInvites; }
  537. set { this._allowMessengerInvites = value; }
  538. }
  539.  
  540. public bool AllowPetSpeech
  541. {
  542. get { return this._allowPetSpeech; }
  543. set { this._allowPetSpeech = value; }
  544. }
  545.  
  546. public bool AllowBotSpeech
  547. {
  548. get { return this._allowBotSpeech; }
  549. set { this._allowBotSpeech = value; }
  550. }
  551.  
  552. public bool AllowPublicRoomStatus
  553. {
  554. get { return this._allowPublicRoomStatus; }
  555. set { this._allowPublicRoomStatus = value; }
  556. }
  557.  
  558. public bool AllowConsoleMessages
  559. {
  560. get { return this._allowConsoleMessages; }
  561. set { this._allowConsoleMessages = value; }
  562. }
  563.  
  564. public bool AllowGifts
  565. {
  566. get { return this._allowGifts; }
  567. set { this._allowGifts = value; }
  568. }
  569.  
  570. public bool AllowMimic
  571. {
  572. get { return this._allowMimic; }
  573. set { this._allowMimic = value; }
  574. }
  575.  
  576. public bool ReceiveWhispers
  577. {
  578. get { return this._receiveWhispers; }
  579. set { this._receiveWhispers = value; }
  580. }
  581.  
  582. public bool IgnorePublicWhispers
  583. {
  584. get { return this._ignorePublicWhispers; }
  585. set { this._ignorePublicWhispers = value; }
  586. }
  587.  
  588. public bool PlayingFastFood
  589. {
  590. get { return this._playingFastFood; }
  591. set { this._playingFastFood = value; }
  592. }
  593.  
  594. public FriendBarState FriendbarState
  595. {
  596. get { return this._friendbarState; }
  597. set { this._friendbarState = value; }
  598. }
  599.  
  600. public int ChristmasDay
  601. {
  602. get { return this._christmasDay; }
  603. set { this._christmasDay = value; }
  604. }
  605.  
  606. public int WantsToRideHorse
  607. {
  608. get { return this._wantsToRideHorse; }
  609. set { this._wantsToRideHorse = value; }
  610. }
  611.  
  612. public int TimeAFK
  613. {
  614. get { return this._timeAFK; }
  615. set { this._timeAFK = value; }
  616. }
  617.  
  618. public bool DisableForcedEffects
  619. {
  620. get { return this._disableForcedEffects; }
  621. set { this._disableForcedEffects = value; }
  622. }
  623.  
  624. public bool ChangingName
  625. {
  626. get { return this._changingName; }
  627. set { this._changingName = value; }
  628. }
  629.  
  630. public int FriendCount
  631. {
  632. get { return this._friendCount; }
  633. set { this._friendCount = value; }
  634. }
  635.  
  636. public double FloodTime
  637. {
  638. get { return this._floodTime; }
  639. set { this._floodTime = value; }
  640. }
  641.  
  642. public int BannedPhraseCount
  643. {
  644. get { return this._bannedPhraseCount; }
  645. set { this._bannedPhraseCount = value; }
  646. }
  647.  
  648. public bool RoomAuthOk
  649. {
  650. get { return this._roomAuthOk; }
  651. set { this._roomAuthOk = value; }
  652. }
  653.  
  654. public int CurrentRoomId
  655. {
  656. get { return this._currentRoomId; }
  657. set { this._currentRoomId = value; }
  658. }
  659.  
  660. public int QuestLastCompleted
  661. {
  662. get { return this._questLastCompleted; }
  663. set { this._questLastCompleted = value; }
  664. }
  665.  
  666. public int MessengerSpamCount
  667. {
  668. get { return this._messengerSpamCount; }
  669. set { this._messengerSpamCount = value; }
  670. }
  671.  
  672. public double MessengerSpamTime
  673. {
  674. get { return this._messengerSpamTime; }
  675. set { this._messengerSpamTime = value; }
  676. }
  677.  
  678. public double TimeMuted
  679. {
  680. get { return this._timeMuted; }
  681. set { this._timeMuted = value; }
  682. }
  683.  
  684. public double TradingLockExpiry
  685. {
  686. get { return this._tradingLockExpiry; }
  687. set { this._tradingLockExpiry = value; }
  688. }
  689.  
  690. public double SessionStart
  691. {
  692. get { return this._sessionStart; }
  693. set { this._sessionStart = value; }
  694. }
  695.  
  696. public int TentId
  697. {
  698. get { return this._tentId; }
  699. set { this._tentId = value; }
  700. }
  701.  
  702. public int HopperId
  703. {
  704. get { return this._hopperId; }
  705. set { this._hopperId = value; }
  706. }
  707.  
  708. public bool IsHopping
  709. {
  710. get { return this._isHopping; }
  711. set { this._isHopping = value; }
  712. }
  713.  
  714. public int TeleporterId
  715. {
  716. get { return this._teleportId; }
  717. set { this._teleportId = value; }
  718. }
  719.  
  720. public bool IsTeleporting
  721. {
  722. get { return this._isTeleporting; }
  723. set { this._isTeleporting = value; }
  724. }
  725.  
  726. public int TeleportingRoomID
  727. {
  728. get { return this._teleportingRoomId; }
  729. set { this._teleportingRoomId = value; }
  730. }
  731.  
  732. public bool HasSpoken
  733. {
  734. get { return this._hasSpoken; }
  735. set { this._hasSpoken = value; }
  736. }
  737.  
  738. public double LastAdvertiseReport
  739. {
  740. get { return this._lastAdvertiseReport; }
  741. set { this._lastAdvertiseReport = value; }
  742. }
  743.  
  744. public bool AdvertisingReported
  745. {
  746. get { return this._advertisingReported; }
  747. set { this._advertisingReported = value; }
  748. }
  749.  
  750. public bool AdvertisingReportedBlocked
  751. {
  752. get { return this._advertisingReportBlocked; }
  753. set { this._advertisingReportBlocked = value; }
  754. }
  755.  
  756. public bool WiredInteraction
  757. {
  758. get { return this._wiredInteraction; }
  759. set { this._wiredInteraction = value; }
  760. }
  761.  
  762. public bool InventoryAlert
  763. {
  764. get { return this._inventoryAlert; }
  765. set { this._inventoryAlert = value; }
  766. }
  767.  
  768. public bool IgnoreBobbaFilter
  769. {
  770. get { return this._ignoreBobbaFilter; }
  771. set { this._ignoreBobbaFilter = value; }
  772. }
  773.  
  774. public bool WiredTeleporting
  775. {
  776. get { return this._wiredTeleporting; }
  777. set { this._wiredTeleporting = value; }
  778. }
  779.  
  780. public int CustomBubbleId
  781. {
  782. get { return this._customBubbleId; }
  783. set { this._customBubbleId = value; }
  784. }
  785.  
  786. public bool OnHelperDuty
  787. {
  788. get { return this._onHelperDuty; }
  789. set { this._onHelperDuty = value; }
  790. }
  791.  
  792. public int FastfoodScore
  793. {
  794. get { return this._fastfoodScore; }
  795. set { this._fastfoodScore = value; }
  796. }
  797.  
  798. public int PetId
  799. {
  800. get { return this._petId; }
  801. set { this._petId = value; }
  802. }
  803.  
  804. public int CreditsUpdateTick
  805. {
  806. get { return this._creditsTickUpdate; }
  807. set { this._creditsTickUpdate = value; }
  808. }
  809.  
  810. public int DiamondsUpdateTick
  811. {
  812. get { return this._diamondsTickUpdate; }
  813. set { this._diamondsTickUpdate = value; }
  814. }
  815.  
  816. public IChatCommand IChatCommand
  817. {
  818. get { return this._iChatCommand; }
  819. set { this._iChatCommand = value; }
  820. }
  821.  
  822. public DateTime LastGiftPurchaseTime
  823. {
  824. get { return this._lastGiftPurchaseTime; }
  825. set { this._lastGiftPurchaseTime = value; }
  826. }
  827.  
  828. public DateTime LastMottoUpdateTime
  829. {
  830. get { return this._lastMottoUpdateTime; }
  831. set { this._lastMottoUpdateTime = value; }
  832. }
  833.  
  834. public DateTime LastClothingUpdateTime
  835. {
  836. get { return this._lastClothingUpdateTime; }
  837. set { this._lastClothingUpdateTime = value; }
  838. }
  839.  
  840. public DateTime LastForumMessageUpdateTime
  841. {
  842. get { return this._lastForumMessageUpdateTime; }
  843. set { this._lastForumMessageUpdateTime = value; }
  844. }
  845.  
  846. public int GiftPurchasingWarnings
  847. {
  848. get { return this._giftPurchasingWarnings; }
  849. set { this._giftPurchasingWarnings = value; }
  850. }
  851.  
  852. public int MottoUpdateWarnings
  853. {
  854. get { return this._mottoUpdateWarnings; }
  855. set { this._mottoUpdateWarnings = value; }
  856. }
  857.  
  858. public int ClothingUpdateWarnings
  859. {
  860. get { return this._clothingUpdateWarnings; }
  861. set { this._clothingUpdateWarnings = value; }
  862. }
  863.  
  864. public bool SessionGiftBlocked
  865. {
  866. get { return this._sessionGiftBlocked; }
  867. set { this._sessionGiftBlocked = value; }
  868. }
  869.  
  870. public bool SessionMottoBlocked
  871. {
  872. get { return this._sessionMottoBlocked; }
  873. set { this._sessionMottoBlocked = value; }
  874. }
  875.  
  876. public bool SessionClothingBlocked
  877. {
  878. get { return this._sessionClothingBlocked; }
  879. set { this._sessionClothingBlocked = value; }
  880. }
  881.  
  882. public HabboStats GetStats()
  883. {
  884. return this._habboStats;
  885. }
  886.  
  887. public bool InRoom
  888. {
  889. get
  890. {
  891. return CurrentRoomId >= 1 && CurrentRoom != null;
  892. }
  893. }
  894.  
  895. public Room CurrentRoom
  896. {
  897. get
  898. {
  899. if (CurrentRoomId <= 0)
  900. return null;
  901.  
  902. Room _room = null;
  903. if (PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(CurrentRoomId, out _room))
  904. return _room;
  905.  
  906. return null;
  907. }
  908. }
  909.  
  910. public bool CacheExpired()
  911. {
  912. TimeSpan Span = DateTime.Now - _timeCached;
  913. return (Span.TotalMinutes >= 30);
  914. }
  915.  
  916. public string GetQueryString
  917. {
  918. get
  919. {
  920. this._habboSaved = true;
  921. return "UPDATE `users` SET `online` = '0', `last_online` = '" + PlusEnvironment.GetUnixTimestamp() + "', `activity_points` = '" + this.Duckets + "', `credits` = '" + this.Credits + "', `vip_points` = '" + this.Diamonds + "', `gotw_points` = '" + this.GOTWPoints + "', `time_muted` = '" + this.TimeMuted + "',`friend_bar_state` = '" + FriendBarStateUtility.GetInt(this._friendbarState) + "' WHERE id = '" + Id + "' LIMIT 1;UPDATE `user_stats` SET `roomvisits` = '" + this._habboStats.RoomVisits + "', `onlineTime` = '" + (PlusEnvironment.GetUnixTimestamp() - SessionStart + this._habboStats.OnlineTime) + "', `respect` = '" + this._habboStats.Respect + "', `respectGiven` = '" + this._habboStats.RespectGiven + "', `giftsGiven` = '" + this._habboStats.GiftsGiven + "', `giftsReceived` = '" + this._habboStats.GiftsReceived + "', `dailyRespectPoints` = '" + this._habboStats.DailyRespectPoints + "', `dailyPetRespectPoints` = '" + this._habboStats.DailyPetRespectPoints + "', `AchievementScore` = '" + this._habboStats.AchievementPoints + "', `quest_id` = '" + this._habboStats.QuestID + "', `quest_progress` = '" + this._habboStats.QuestProgress + "', `groupid` = '" + this._habboStats.FavouriteGroupId + "',`forum_posts` = '" + this._habboStats.ForumPosts + "' WHERE `id` = '" + this.Id + "' LIMIT 1;";
  922. }
  923. }
  924.  
  925. public bool InitProcess()
  926. {
  927. this._process = new ProcessComponent();
  928. if (this._process.Init(this))
  929. return true;
  930. return false;
  931. }
  932.  
  933. public bool InitSearches()
  934. {
  935. this._navigatorSearches = new SearchesComponent();
  936. if (this._navigatorSearches.Init(this))
  937. return true;
  938. return false;
  939. }
  940.  
  941. public bool InitFX()
  942. {
  943. this._fx = new EffectsComponent();
  944. if (this._fx.Init(this))
  945. return true;
  946. return false;
  947. }
  948.  
  949. public bool InitClothing()
  950. {
  951. this._clothing = new ClothingComponent();
  952. if (this._clothing.Init(this))
  953. return true;
  954. return false;
  955. }
  956.  
  957. private bool InitPermissions()
  958. {
  959. this._permissions = new PermissionComponent();
  960. if (this._permissions.Init(this))
  961. return true;
  962. return false;
  963. }
  964.  
  965. public void InitInformation(UserData data)
  966. {
  967. BadgeComponent = new BadgeComponent(this, data);
  968. Relationships = data.Relations;
  969. }
  970.  
  971. public void Init(GameClient client, UserData data)
  972. {
  973. this.Achievements = data.achievements;
  974.  
  975. this.FavoriteRooms = new ArrayList();
  976. foreach (int id in data.favouritedRooms)
  977. {
  978. FavoriteRooms.Add(id);
  979. }
  980.  
  981. this.MutedUsers = data.ignores;
  982.  
  983. this._client = client;
  984. BadgeComponent = new BadgeComponent(this, data);
  985. InventoryComponent = new InventoryComponent(Id, client);
  986.  
  987. quests = data.quests;
  988.  
  989. Messenger = new HabboMessenger(Id);
  990. Messenger.Init(data.friends, data.requests);
  991. this._friendCount = Convert.ToInt32(data.friends.Count);
  992. this._disconnected = false;
  993. UsersRooms = data.rooms;
  994. Relationships = data.Relations;
  995.  
  996. this.InitSearches();
  997. this.InitFX();
  998. this.InitClothing();
  999. }
  1000.  
  1001.  
  1002. public PermissionComponent GetPermissions()
  1003. {
  1004. return this._permissions;
  1005. }
  1006.  
  1007. public void OnDisconnect()
  1008. {
  1009. if (this._disconnected)
  1010. return;
  1011.  
  1012. try
  1013. {
  1014. if (this._process != null)
  1015. this._process.Dispose();
  1016. }
  1017. catch { }
  1018.  
  1019. this._disconnected = true;
  1020.  
  1021. PlusEnvironment.GetGame().GetClientManager().UnregisterClient(Id, Username);
  1022.  
  1023. if (!this._habboSaved)
  1024. {
  1025. this._habboSaved = true;
  1026. using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  1027. {
  1028. dbClient.RunQuery("UPDATE `users` SET `online` = '0', `last_online` = '" + PlusEnvironment.GetUnixTimestamp() + "', `activity_points` = '" + this.Duckets + "', `credits` = '" + this.Credits + "', `vip_points` = '" + this.Diamonds + "', `gotw_points` = '" + this.GOTWPoints + "', `time_muted` = '" + this.TimeMuted + "',`friend_bar_state` = '" + FriendBarStateUtility.GetInt(this._friendbarState) + "' WHERE id = '" + Id + "' LIMIT 1;UPDATE `user_stats` SET `roomvisits` = '" + this._habboStats.RoomVisits + "', `onlineTime` = '" + (PlusEnvironment.GetUnixTimestamp() - this.SessionStart + this._habboStats.OnlineTime) + "', `respect` = '" + this._habboStats.Respect + "', `respectGiven` = '" + this._habboStats.RespectGiven + "', `giftsGiven` = '" + this._habboStats.GiftsGiven + "', `giftsReceived` = '" + this._habboStats.GiftsReceived + "', `dailyRespectPoints` = '" + this._habboStats.DailyRespectPoints + "', `dailyPetRespectPoints` = '" + this._habboStats.DailyPetRespectPoints + "', `AchievementScore` = '" + this._habboStats.AchievementPoints + "', `quest_id` = '" + this._habboStats.QuestID + "', `quest_progress` = '" + this._habboStats.QuestProgress + "', `groupid` = '" + this._habboStats.FavouriteGroupId + "',`forum_posts` = '" + this._habboStats.ForumPosts + "' WHERE `id` = '" + this.Id + "' LIMIT 1;");
  1029.  
  1030. if (GetPermissions().HasRight("mod_tickets"))
  1031. dbClient.RunQuery("UPDATE `moderation_tickets` SET `status` = 'open', `moderator_id` = '0' WHERE `status` ='picked' AND `moderator_id` = '" + Id + "'");
  1032. }
  1033. }
  1034.  
  1035. this.Dispose();
  1036.  
  1037. this._client = null;
  1038.  
  1039. }
  1040.  
  1041. public void Dispose()
  1042. {
  1043. if (this.InventoryComponent != null)
  1044. this.InventoryComponent.SetIdleState();
  1045.  
  1046. if (this.UsersRooms != null)
  1047. UsersRooms.Clear();
  1048.  
  1049. if (this.InRoom && this.CurrentRoom != null)
  1050. this.CurrentRoom.GetRoomUserManager().RemoveUserFromRoom(this._client, false, false);
  1051.  
  1052. if (Messenger != null)
  1053. {
  1054. this.Messenger.AppearOffline = true;
  1055. this.Messenger.Destroy();
  1056. }
  1057.  
  1058. if (this._fx != null)
  1059. this._fx.Dispose();
  1060.  
  1061. if (this._clothing != null)
  1062. this._clothing.Dispose();
  1063.  
  1064. if (this._permissions != null)
  1065. this._permissions.Dispose();
  1066. }
  1067.  
  1068. public void CheckCreditsTimer()
  1069. {
  1070. try
  1071. {
  1072. this._creditsTickUpdate--;
  1073.  
  1074. if (this._creditsTickUpdate <= 0)
  1075. {
  1076. int CreditUpdate = PlusStaticGameSettings.UserCreditsUpdateAmount;
  1077. int DucketUpdate = PlusStaticGameSettings.UserPixelsUpdateAmount;
  1078.  
  1079. SubscriptionData SubData = null;
  1080. if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
  1081. {
  1082. CreditUpdate += SubData.Credits;
  1083. DucketUpdate += SubData.Duckets;
  1084. }
  1085.  
  1086. this._credits += CreditUpdate;
  1087. this._duckets += DucketUpdate;
  1088.  
  1089. this._client.SendMessage(new CreditBalanceComposer(this._credits));
  1090. this._client.SendMessage(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate));
  1091.  
  1092. this.CreditsUpdateTick = PlusStaticGameSettings.UserDiamondsUpdateTimer;
  1093. }
  1094. }
  1095. catch { }
  1096. }
  1097.  
  1098. public void CheckDiamondsTimer()
  1099. {
  1100. try
  1101. {
  1102. this._diamondsTickUpdate--;
  1103.  
  1104. if (this._diamondsTickUpdate <= 0)
  1105. {
  1106. int DiamondsUpdate = PlusStaticGameSettings.UserDiamondsUpdateTimer;
  1107.  
  1108. SubscriptionData SubData = null;
  1109. if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
  1110. {
  1111. DiamondsUpdate += 1;
  1112. }
  1113.  
  1114. this._credits += Diamonds;
  1115.  
  1116. this._client.SendMessage(new CreditBalanceComposer(this._credits));
  1117. this._client.SendMessage(new HabboActivityPointNotificationComposer(this._diamonds, DiamondsUpdate));
  1118.  
  1119. this.DiamondsUpdateTick = PlusStaticGameSettings.UserDiamondsUpdateTimer;
  1120. }
  1121. }
  1122. catch { }
  1123. }
  1124.  
  1125. public GameClient GetClient()
  1126. {
  1127. if (this._client != null)
  1128. return this._client;
  1129.  
  1130. return PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(Id);
  1131. }
  1132.  
  1133. public HabboMessenger GetMessenger()
  1134. {
  1135. return Messenger;
  1136. }
  1137.  
  1138. public BadgeComponent GetBadgeComponent()
  1139. {
  1140. return BadgeComponent;
  1141. }
  1142.  
  1143. public InventoryComponent GetInventoryComponent()
  1144. {
  1145. return InventoryComponent;
  1146. }
  1147.  
  1148. public SearchesComponent GetNavigatorSearches()
  1149. {
  1150. return this._navigatorSearches;
  1151. }
  1152.  
  1153. public EffectsComponent Effects()
  1154. {
  1155. return this._fx;
  1156. }
  1157.  
  1158. public ClothingComponent GetClothing()
  1159. {
  1160. return this._clothing;
  1161. }
  1162.  
  1163. public int GetQuestProgress(int p)
  1164. {
  1165. int progress = 0;
  1166. quests.TryGetValue(p, out progress);
  1167. return progress;
  1168. }
  1169.  
  1170. public UserAchievement GetAchievementData(string p)
  1171. {
  1172. UserAchievement achievement = null;
  1173. Achievements.TryGetValue(p, out achievement);
  1174. return achievement;
  1175. }
  1176.  
  1177. public void ChangeName(string Username)
  1178. {
  1179. this.LastNameChange = PlusEnvironment.GetUnixTimestamp();
  1180. this.Username = Username;
  1181.  
  1182. this.SaveKey("username", Username);
  1183. this.SaveKey("last_change", this.LastNameChange.ToString());
  1184. }
  1185.  
  1186. public void SaveKey(string Key, string Value)
  1187. {
  1188. using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  1189. {
  1190. dbClient.SetQuery("UPDATE `users` SET " + Key + " = @value WHERE `id` = '" + this.Id + "' LIMIT 1;");
  1191. dbClient.AddParameter("value", Value);
  1192. dbClient.RunQuery();
  1193. }
  1194. }
  1195.  
  1196. public void PrepareRoom(int Id, string Password)
  1197. {
  1198. if (this.GetClient() == null || this.GetClient().GetHabbo() == null)
  1199. return;
  1200.  
  1201. if (this.GetClient().GetHabbo().InRoom)
  1202. {
  1203. Room OldRoom = null;
  1204. if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(this.GetClient().GetHabbo().CurrentRoomId, out OldRoom))
  1205. return;
  1206.  
  1207. if (OldRoom.GetRoomUserManager() != null)
  1208. OldRoom.GetRoomUserManager().RemoveUserFromRoom(this.GetClient(), false, false);
  1209. }
  1210.  
  1211. if (this.GetClient().GetHabbo().IsTeleporting && this.GetClient().GetHabbo().TeleportingRoomID != Id)
  1212. {
  1213. this.GetClient().SendMessage(new CloseConnectionComposer());
  1214. return;
  1215. }
  1216.  
  1217. Room Room = PlusEnvironment.GetGame().GetRoomManager().LoadRoom(Id);
  1218. if (Room == null)
  1219. {
  1220. this.GetClient().SendMessage(new CloseConnectionComposer());
  1221. return;
  1222. }
  1223.  
  1224. if (Room.isCrashed)
  1225. {
  1226. this.GetClient().SendNotification("This room has crashed! :(");
  1227. this.GetClient().SendMessage(new CloseConnectionComposer());
  1228. return;
  1229. }
  1230.  
  1231. this.GetClient().GetHabbo().CurrentRoomId = Room.RoomId;
  1232.  
  1233. if (Room.GetRoomUserManager().userCount >= Room.UsersMax && !this.GetClient().GetHabbo().GetPermissions().HasRight("room_enter_full") && this.GetClient().GetHabbo().Id != Room.OwnerId)
  1234. {
  1235. this.GetClient().SendMessage(new CantConnectComposer(1));
  1236. this.GetClient().SendMessage(new CloseConnectionComposer());
  1237. return;
  1238. }
  1239.  
  1240. if (!this.GetClient().GetHabbo().GetPermissions().HasRight("room_ban_override") && Room.UserIsBanned(this.GetClient().GetHabbo().Id))
  1241. {
  1242. if (Room.HasBanExpired(this.GetClient().GetHabbo().Id))
  1243. Room.RemoveBan(this.GetClient().GetHabbo().Id);
  1244. else
  1245. {
  1246. this.GetClient().GetHabbo().RoomAuthOk = false;
  1247. this.GetClient().SendMessage(new CantConnectComposer(4));
  1248. this.GetClient().SendMessage(new CloseConnectionComposer());
  1249. return;
  1250. }
  1251. }
  1252.  
  1253. this.GetClient().SendMessage(new OpenConnectionComposer());
  1254. if (!Room.CheckRights(this.GetClient(), true, true) && !this.GetClient().GetHabbo().IsTeleporting && !this.GetClient().GetHabbo().IsHopping)
  1255. {
  1256. if (Room.Access == RoomAccess.DOORBELL && !this.GetClient().GetHabbo().GetPermissions().HasRight("room_enter_locked"))
  1257. {
  1258. if (Room.UserCount > 0)
  1259. {
  1260. this.GetClient().SendMessage(new DoorbellComposer(""));
  1261. Room.SendMessage(new DoorbellComposer(this.GetClient().GetHabbo().Username), true);
  1262. return;
  1263. }
  1264. else
  1265. {
  1266. this.GetClient().SendMessage(new FlatAccessDeniedComposer(""));
  1267. this.GetClient().SendMessage(new CloseConnectionComposer());
  1268. return;
  1269. }
  1270. }
  1271. else if (Room.Access == RoomAccess.PASSWORD && !this.GetClient().GetHabbo().GetPermissions().HasRight("room_enter_locked"))
  1272. {
  1273. if (Password.ToLower() != Room.Password.ToLower() || String.IsNullOrWhiteSpace(Password))
  1274. {
  1275. this.GetClient().SendMessage(new GenericErrorComposer(-100002));
  1276. this.GetClient().SendMessage(new CloseConnectionComposer());
  1277. return;
  1278. }
  1279. }
  1280. }
  1281.  
  1282. if (!EnterRoom(Room))
  1283. this.GetClient().SendMessage(new CloseConnectionComposer());
  1284.  
  1285. }
  1286.  
  1287. public bool EnterRoom(Room Room)
  1288. {
  1289. if (Room == null)
  1290. this.GetClient().SendMessage(new CloseConnectionComposer());
  1291.  
  1292. this.GetClient().SendMessage(new RoomReadyComposer(Room.RoomId, Room.ModelName));
  1293. if (Room.Wallpaper != "0.0")
  1294. this.GetClient().SendMessage(new RoomPropertyComposer("wallpaper", Room.Wallpaper));
  1295. if (Room.Floor != "0.0")
  1296. this.GetClient().SendMessage(new RoomPropertyComposer("floor", Room.Floor));
  1297.  
  1298. this.GetClient().SendMessage(new RoomPropertyComposer("landscape", Room.Landscape));
  1299. this.GetClient().SendMessage(new RoomRatingComposer(Room.Score, !(this.GetClient().GetHabbo().RatedRooms.Contains(Room.RoomId) || Room.OwnerId == this.GetClient().GetHabbo().Id)));
  1300.  
  1301. using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  1302. {
  1303. dbClient.RunQuery("INSERT INTO user_roomvisits (user_id,room_id,entry_timestamp,exit_timestamp,hour,minute) VALUES ('" + this.GetClient().GetHabbo().Id + "','" + this.GetClient().GetHabbo().CurrentRoomId + "','" + PlusEnvironment.GetUnixTimestamp() + "','0','" + DateTime.Now.Hour + "','" + DateTime.Now.Minute + "');");// +
  1304. }
  1305.  
  1306. if (Room.OwnerId != this.Id)
  1307. {
  1308. this.GetClient().GetHabbo().GetStats().RoomVisits += 1;
  1309. PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(this.GetClient(), "ACH_RoomEntry", 1); ;
  1310. }
  1311. return true;
  1312. }
  1313. }
  1314. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement