public ActionResult Destiny1Index(bool noLayout = false) { if (Destiny1Cache == null || Destiny1Cache.CacheExpired) { Destiny1Cache = new HeroicDailyModel { DailyMission = DailyManager.GetDaily() }; if (Destiny1Cache.DailyMission != null) { Destiny1Cache.DailyModifiers = DailyManager.GetModifiers(Destiny1Cache.DailyMission.missionid); Destiny1Cache.DailyRewards = DailyManager.GetRewards(Destiny1Cache.DailyMission.missionid); } var bounties = BountyManager.GetBounties(); if (bounties != null && bounties.Any()) { Destiny1Cache.DailyBounties = bounties; } Destiny1Cache.TimeDifferenceTime = DailyManager.TodayDate; Destiny1Cache.ExpiryTime = DateTime.Now.AddHours(1); Destiny1Cache.StartTime = DateTime.Now; } if (noLayout) { return(View("Destiny1/PartialIndex", Destiny1Cache)); } ViewBag.HtmlTagOverride = @"data-redirect=""/#daily"""; return(View("Destiny1/Index", Cache)); }
public VendorsController() { VendorManager = new VendorManager(); XurManager = new XurManager(); TrialsManager = new TrialsManager(); BountyManager = new BountyManager(); }
public ActionResult Destiny1Index(bool noLayout = false) { if (Destiny1Cache == null || Destiny1Cache.CacheExpired) { var nf = NfManager.GetD1NightFall(); var weeklyBounties = BountyManager.GetWeeklyBounties("Zavala"); Destiny1Cache = new NightfallDataModel() { ThisNightfall = nf, ExpiryTime = DateTime.Now.AddHours(1), StartTime = DateTime.Now, WeeklyStrikeBounties = weeklyBounties }; } if (noLayout) { return(View("Destiny1/PartialIndex", Destiny1Cache)); } else { ViewBag.HtmlTagOverride = @"data-redirect=""/#nightfall"""; return(View("Destiny1/Index", Destiny1Cache)); } }
public ActionResult Destiny1Index(bool noLayout = false) { if (D1Cache == null || D1Cache.CacheExpired) { D1Cache = new VendorContentModel() { HideSrl = true, XurInTower = XurManager.InTower(1), XurSales = XurManager.GetD1CurrentItems(), XurLocation = XurManager.GetD1CurrentLocation(), MaterialExchanges = VendorManager.GetMaterialExchange(), MaterialDetail = VendorManager.GetMaterialDetails(), TrialsDetails = TrialsManager.GetCurrentMap(), IronLordBounties = BountyManager.GetWeeklyBounties("Shiro"), IronLordArtifacts = BountyManager.GetWeeklyRewards("Tyra"), SrlBounties = BountyManager.GetBounties("Srl"), SrlRewards = BountyManager.GetRewards(new DateTime(2016, 12, 13), 1, "Srl"), ExpiryTime = DateTime.Now.AddMinutes(30), StartTime = DateTime.Now }; } if (noLayout) { return(View("Destiny1/PartialIndex", D1Cache)); } else { ViewBag.HtmlTagOverride = @"data-redirect=""/#vendors"""; return(View("Destiny1/Index", D1Cache)); } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { StringBuilder Message = new StringBuilder().Append("<----- Usuários com Recompensas ----->\n\n"); if (BountyManager.BountyUsers.Count <= 0) { Message.Append("Ninguém está em uma recompensa agora!\n"); } lock (BountyManager.BountyUsers.Values) { foreach (Bounty Bounty in BountyManager.BountyUsers.Values) { if (PlusEnvironment.GetUnixTimestamp() > Bounty.ExpiryTimeStamp) { BountyManager.RemoveBounty(Bounty.UserId, true); Habbo BountyOwner = PlusEnvironment.GetHabboById(Convert.ToInt32(Bounty.AddedBy)); if (BountyOwner == null || BountyOwner.GetClient() == null) { continue; } BountyOwner.GetClient().SendWhisper("A recompensa que você definiu " + PlusEnvironment.GetHabboById(Convert.ToInt32(Bounty.UserId)).Username + " expirou!", 1); } TimeSpan Difference = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Bounty.ExpiryTimeStamp).Subtract(new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(PlusEnvironment.GetUnixTimestamp())); Message.Append("Usuário: " + PlusEnvironment.GetHabboById(Convert.ToInt32(Bounty.UserId)).Username + " - Expira em " + ((int)Difference.TotalMinutes < 0 ? 0 : (int)Difference.TotalMinutes) + " minutos\n"); Message.Append("Recompensa: R$" + String.Format("{0:N0}", Bounty.Reward) + "\n\n"); } } Session.SendMessage(new MOTDNotificationComposer(Message.ToString())); }
// Start is called before the first frame update void Start() { bountyManager = BountyManager._instance; //アニメーターの取得 animator_ = GetComponent <Animator>(); }
public WeeklyController() { NfManager = new NightFallManager(); VendorManager = new VendorManager(); PrisonManager = new PrisonManager(); BountyManager = new BountyManager(); }
// Start is called before the first frame update void Start() { player_ = FindObjectOfType <Player>(); bountyManager_ = BountyManager._instance; foreach (var meter in gauge_) { meter.SetActive(false); } }
public LowerTierCampaignManager(List <RVRProgression> _RVRT1Progressions, List <RegionMgr> regionMgrs) { BattleFrontProgressions = _RVRT1Progressions; RegionMgrs = regionMgrs; BattleFrontStatuses = new List <BattleFrontStatus>(); ImpactMatrixManagerInstance = new ImpactMatrixManager(); BountyManagerInstance = new BountyManager(); if (_RVRT1Progressions != null) { BuildApocBattleFrontStatusList(BattleFrontProgressions); } }
// Start is called before the first frame update protected void Start() { ammo_ = MaxAmmo_; shotTime_ = 0.0f; _bountyManager = BountyManager._instance; _audioManager = AudioManager.Instance; _animator = GetComponent <Animator>(); _isAnimation = true; }
public ActionResult Index(bool noLayout = false) { Cache = new DailyModel(); BountyManager.SampleApiTest(); if (noLayout) { return(View("PartialIndex", Cache)); } ViewBag.HtmlTagOverride = @"data-redirect=""/#daily"""; return(View("Index", Cache)); }
private void Awake() { if (!instance) { instance = this; } else if (instance && instance != this) { Destroy(this); } ToggleBountyCanvas(false); SetupAvailableBountyUI(); }
public UpperTierCampaignManager(List <RVRProgression> _RVRT4Progressions, List <RegionMgr> regionMgrs) { BattleFrontProgressions = _RVRT4Progressions; RegionMgrs = regionMgrs; BattleFrontStatuses = new List <BattleFrontStatus>(); ImpactMatrixManagerInstance = new ImpactMatrixManager(); BountyManagerInstance = new BountyManager(); if (_RVRT4Progressions != null) { BuildApocBattleFrontStatusList(BattleFrontProgressions); } LastAAORallyCall = FrameWork.TCPManager.GetTimeStamp(); _EvtInterface.AddEvent(BroadcastPlayerMessages, 600000, 0); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Opa, você esqueceu de inserir um nome de usuário!", 1); return; } GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocorreu um erro ao tentar encontrar esse usuário, talvez ele esteja offline.", 1); return; } if (Session.GetRoleplay().TryGetCooldown("rrecompensa")) { return; } var BountyList = BountyManager.BountyUsers; List <Bounty> Bounty = BountyManager.BountyUsers.Values.Where(x => x.AddedBy == Session.GetHabbo().Id).ToList(); if (Bounty.Count <= 0) { Session.SendWhisper("Você não pode fazer isso, você não é o dono da recompensa de " + TargetClient.GetHabbo().Username + "!", 1); return; } if (!BountyList.ContainsKey(TargetClient.GetHabbo().Id)) { Session.SendWhisper(TargetClient.GetHabbo().Username + " não está na lista de recompensas!", 1); return; } BountyManager.RemoveBounty(TargetClient.GetHabbo().Id); Session.Shout("*Remove " + TargetClient.GetHabbo().Username + " da lista de recompensas*", 4); Session.GetRoleplay().CooldownManager.CreateCooldown("rrecompensa", 1000, 5); }
// Start is called before the first frame update void Start() { cameraTransform_ = Camera.main.transform; //gunL_ = GetComponentInChildren<Gun>(); //gunR_ = GetComponentInChildren<Gun>(); position_ = transform.position; moveSpeed_ = walkSpeed_; //初期角度を取得して置く _xAxiz = cameraTransform_.localEulerAngles; _bountyManager = BountyManager._instance; _weponManager = SpecialWeaponManager._instance; //_viewRotetaSpeed = RotationSpeed_; _weaponAnims = new List <Animator>(); WeaponList = new List <Gun> { gunL_, gunR_, null }; _appManager = GameObject.FindGameObjectWithTag(TagName.MANAGER).GetComponent <ApplicationManager>(); if (_appManager == null) { Debug.Log("GameSceneController"); } _audioManager = AudioManager.Instance; _canvas = GameObject.Find("GameUI_Canvas").transform; spWeaponUI_ = FindObjectOfType <UI.UI_SP_Weapon>(); _comboManager = ComboManager.Instance; _weaponType = (int)WEAPON_TYPE.HANDGUN; }
public ActionResult Destiny1Index(bool noLayout = false) { if (CacheExpired) { var featuredRaid = VendorManager.GetFeaturedRaid(); var weekly = NfManager.GetWeekly(); var weeklyBounties = BountyManager.GetBounties("Strike"); var raidChallenges = VendorManager.GetRaidChallenges(); var challengeElders = PrisonManager.GetDetailedChallenge(); var weeklyCrucible = NfManager.GetDetailedCrucibleWeekly(); var ironBannerBounties = BountyManager.GetWeeklyBounties("IronBanner"); var ironBannerRewards = BountyManager.GetWeeklyRewards("IronBanner"); var weeklyPlaylist = NfManager.GetWeeklyStory(); Cache = new WeeklyDataModel() { ThisWeekly = weekly, StrikeBounties = weeklyBounties, RaidChallenges = raidChallenges, EldersChallenge = challengeElders, WeeklyCrucible = weeklyCrucible, IronBannerBounties = ironBannerBounties, IronBannerRewards = ironBannerRewards, FeaturedRaid = featuredRaid, WeeklyPlaylist = weeklyPlaylist, ExpiryTime = DateTime.Now.AddHours(1), StartTime = DateTime.Now }; } if (noLayout) { return(View("Destiny1/PartialIndex", Cache)); } else { ViewBag.HtmlTagOverride = @"data-redirect=""/#weekly"""; return(View("Destiny1/Index", Cache)); } }
public RegionMgr(ushort regionId, List <Zone_Info> zones, string name, IApocCommunications apocCommunications) { ApocCommunications = apocCommunications; RegionId = regionId; ZonesInfo = zones; RegionName = name; LoadSpawns(); BountyManager = new BountyManager(); try { switch (ZonesInfo[0].Pairing) { case (byte)Pairing.PAIRING_GREENSKIN_DWARVES: _races = new[] { Races.RACES_DWARF, Races.RACES_GOBLIN }; break; case (byte)Pairing.PAIRING_EMPIRE_CHAOS: _races = new[] { Races.RACES_EMPIRE, Races.RACES_CHAOS }; break; case (byte)Pairing.PAIRING_ELVES_DARKELVES: _races = new[] { Races.RACES_HIGH_ELF, Races.RACES_DARK_ELF }; break; } } catch (Exception e) { _logger.Error($"Zone - Pairing {e.Message} {e.StackTrace}"); throw; } _updater = new Thread(Update); _updater.Start(); RegionCreatures = GetObjects <Creature>().ToList(); }
protected void Awake() { _bountyManager = BountyManager._instance; _canvas = GameObject.Find("WeaponUI"); }
public NightFallController() { NfManager = new NightFallManager(); BountyManager = new BountyManager(); }
private void Start() { bountyManager_ = BountyManager._instance; }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Você deve incluir uma coisa para atualizar, e.x. :atualizar catalogo", 1); return; } string UpdateVariable = Params[1]; switch (UpdateVariable.ToLower()) { case "cata": case "catalog": case "catalogue": case "catalogo": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_catalog")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_catalog'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().Init(PlusEnvironment.GetGame().GetItemManager()); PlusEnvironment.GetGame().GetClientManager().SendMessage(new CatalogUpdatedComposer()); Session.SendWhisper("Catálogo atualizado com sucesso.", 1); break; } case "items": case "furni": case "furniture": case "mobis": case "mobi": case "mobilias": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_furni")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_furni'.", 1); break; } PlusEnvironment.GetGame().GetItemManager().Init(); Session.SendWhisper("Itens/Mobis atualizados com sucesso.", 1); break; } case "models": case "modelos": case "model": case "quartos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_models")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_models'.", 1); break; } PlusEnvironment.GetGame().GetRoomManager().LoadModels(); Session.SendWhisper("Modelos de quartos atualizados com sucesso.", 1); break; } case "promotions": case "promocoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_promotions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_promotions'.", 1); break; } PlusEnvironment.GetGame().GetLandingManager().LoadPromotions(); Session.SendWhisper("Landing view promotions successfully updated.", 1); break; } case "youtube": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_youtube")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_youtube'", 1); break; } PlusEnvironment.GetGame().GetTelevisionManager().Init(); Session.SendWhisper("A lista de televisões do Youtube foi atualizada com sucesso. ", 1); break; } case "filter": case "filtro": case "filtros": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_filter")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_filter'", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetFilter().Init(); Session.SendWhisper("Definições de filtro atualizadas com sucesso.", 1); break; } case "navigator": case "navegador": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_navigator")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_navigator'.", 1); break; } PlusEnvironment.GetGame().GetNavigator().Init(); Session.SendWhisper("Itens do navegador atualizados com sucesso.", 1); break; } case "ranks": case "rights": case "permissions": case "cargos": case "permissao": case "permissoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_permissions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_rights'.", 1); break; } PlusEnvironment.GetGame().GetPermissionManager().Init(); foreach (GameClient Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (Client == null || Client.GetHabbo() == null || Client.GetHabbo().GetPermissions() == null) { continue; } Client.GetHabbo().GetPermissions().Init(Client.GetHabbo()); } Session.SendWhisper("Definições de Cargo atualizadas com sucesso.", 1); break; } case "config": case "settings": case "configuracoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_configuration")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_configuration'.", 1); break; } PlusEnvironment.ConfigData = new ConfigData(); Session.SendWhisper("Configuração do servidor atualizada com sucesso.", 1); break; } case "bans": case "ban": case "banimentos": case "banidos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bans")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bans'.", 1); break; } PlusEnvironment.GetGame().GetModerationManager().ReCacheBans(); Session.SendWhisper("A lista de banidos foi atualizada com sucesso.", 1); break; } case "quests": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_quests")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_quests'.", 1); break; } PlusEnvironment.GetGame().GetQuestManager().Init(); Session.SendWhisper("Definições de Tarefas atualizadas com êxito.", 1); break; } case "achievements": case "conquistas": case "conquista": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_achievements")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_achievements'.", 1); break; } PlusEnvironment.GetGame().GetAchievementManager().LoadAchievements(); Session.SendWhisper("Definições de conquistas atualizadas com êxito.", 1); break; } case "clothing": case "visuais": case "roupas": case "visual": case "roupa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_clothing")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_clothing'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().GetClothingManager().Init(); Session.SendWhisper("Mobiliário de vestuário e preços recarregados.", 1); break; } case "moderation": case "moderacao": case "mods": case "moderadores": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_moderation")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_moderation'.", 1); break; } PlusEnvironment.GetGame().GetModerationManager().Init(); PlusEnvironment.GetGame().GetClientManager().ModAlert("As predefinições de moderação foram atualizadas. Recarregue o cliente para ver as novas predefinições."); Session.SendWhisper("Configuração de moderação atualizada com sucesso.", 1); break; } case "tickets": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_tickets")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_tickets'.", 1); break; } if (PlusEnvironment.GetGame().GetModerationTool().Tickets.Count > 0) { PlusEnvironment.GetGame().GetModerationTool().Tickets.Clear(); } PlusEnvironment.GetGame().GetClientManager().ModAlert("Os ingressos foram atualizados. Recarregue o cliente."); Session.SendWhisper("Os ingressos foram atualizados com sucesso.", 1); break; } case "vouchers": case "brindes": case "codigos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_vouchers")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_vouchers'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().GetVoucherManager().Init(); Session.SendWhisper("Vouchers/Códigos brinde atualizado com sucesso.", 1); break; } case "polls": case "perguntas": case "quiz": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_polls")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_polls'.", 1); break; } int PollLoaded; PlusEnvironment.GetGame().GetPollManager().Init(out PollLoaded); Session.SendWhisper("Polls successfully updated.", 1); break; } case "gamecenter": case "centrodejogos": case "cjogos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_game_center")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_game_center'.", 1); break; } PlusEnvironment.GetGame().GetGameDataManager().Init(); Session.SendWhisper("Cache do Centro de Jogos atualizado com sucesso.", 1); break; } case "pet_locale": case "lpet": case "petl": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_pet_locale")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_pet_locale'.", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetPetLocale().Init(); Session.SendWhisper("Pet locale cache successfully updated.", 1); break; } case "locale": case "local": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_locale")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_locale'.", 1); break; } PlusEnvironment.GetGame().GetLanguageLocale().Init(); Session.SendWhisper("Local cache atualizado com sucesso.", 1); break; } case "mutant": case "mutante": case "mutantes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_anti_mutant")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_anti_mutant'.", 1); break; } PlusEnvironment.GetGame().GetAntiMutant().Init(); Session.SendWhisper("Anti mutante recarregado com sucesso.", 1); break; } case "bots": case "bot": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bots'.", 1); break; } PlusEnvironment.GetGame().GetBotManager().Init(); Session.SendWhisper("O gerenciador de Bots foi recarregado com sucesso", 1); break; } case "bots_speech": case "bots speech": case "speech": case "speeches": case "response": case "responses": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bots'", 1); break; } RoleplayBotManager.FetchCachedSpeeches(); Session.SendWhisper("Bots speech and responses successfully reloaded", 1); break; } case "rewards": case "premios": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rewards")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_rewards'.", 1); break; } PlusEnvironment.GetGame().GetRewardManager().Reload(); Session.SendWhisper("O Gerenciador de recompensas foi recarregado com sucesso.", 1); break; } case "chat_styles": case "echats": case "estilos": case "estilo": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_chat_styles")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_chat_styles'.", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetChatStyles().Init(); Session.SendWhisper("Estilos de bate-papo recarregados com sucesso.", 1); break; } case "badges": case "badge_definitions": case "emblemas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_badge_definitions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_badge_definitions'.", 1); break; } PlusEnvironment.GetGame().GetBadgeManager().Init(); Session.SendWhisper("Definições de emblemas recarregadas com sucesso.", 1); break; } case "rpdata": case "roleplaydata": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_roleplay_data")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_roleplaydata'.", 1); break; } RoleplayData.Initialize(); RoleplayManager.UpdateRPData(); Session.SendWhisper("Dados do Roleplay recarregados com sucesso.", 1); break; } case "blacklist": case "listanegra": case "ln": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_blacklist")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_blacklist'.", 1); break; } BlackListManager.Initialize(); Session.SendWhisper("Lista negra recarregada com sucesso.", 1); break; } case "farming": case "agricultura": case "agricolas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_farming")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_farming'.", 1); break; } FarmingManager.Initialize(); Session.SendWhisper("Artigos agrícolas recarregados com sucesso.", 1); break; } case "events": case "games": case "jogos": case "eventos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_events")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_events'.", 1); break; } RoleplayGameManager.Initialize(); Session.SendWhisper("Eventos recarregados com sucesso.", 1); break; } case "corps": case "jobs": case "corporations": case "gangs": case "gangues": case "empregos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_jobs")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_jobs'.", 1); break; } PlusEnvironment.GetGame().GetGroupManager().Initialize(); Session.SendWhisper("Trabalhos e Gangues recarregados com sucesso.", 1); break; } case "turfs": case "turfcaptures": case "gangcaptures": case "territorio": case "territorios": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_turfs")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_turfs'.", 1); break; } TurfManager.Initialize(); Session.SendWhisper("Territórios e Zona de Captura recarregados com sucesso.", 1); break; } case "weapons": case "guns": case "armas": case "arma": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_weapons")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_weapons'.", 1); break; } WeaponManager.Initialize(); #region Refresh User Weapons lock (PlusEnvironment.GetGame().GetClientManager().GetClients) { foreach (GameClient Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (Client == null || Client.GetHabbo() == null || Client.GetRoleplay() == null) { continue; } if (Client.GetRoleplay().EquippedWeapon == null) { continue; } Client.GetRoleplay().EquippedWeapon = null; Client.GetRoleplay().OwnedWeapons = null; Client.GetRoleplay().OwnedWeapons = Client.GetRoleplay().LoadAndReturnWeapons(); Client.SendWhisper("Um administrador atualizou as armas, sua arma foi retirada, equipe de novo!", 1); } } #endregion Session.SendWhisper("Armas recarregadas com sucesso.", 1); break; } case "food": case "drinks": case "bebidas": case "bebida": case "alimentos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_food")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_food'.", 1); break; } FoodManager.Initialize(); Session.SendWhisper("Alimentos e bebidas recarregados com sucesso.", 1); break; } case "houses": case "house": case "casas": case "casa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_houses")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_houses'.", 1); break; } PlusEnvironment.GetGame().GetHouseManager().Init(); Session.SendWhisper("Casas recarregadas com sucesso.", 1); break; } case "crafting": case "construir": case "construcao": case "craft": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_crafting")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_crafting'.", 1); break; } CraftingManager.Initialize(); Session.SendWhisper("Áreas de construção recarregadas com sucesso..", 1); break; } case "lottery": case "loteria": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_lottery")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_lottery'.", 1); break; } LotteryManager.Initialize(); Session.SendWhisper("Loteria recarregados com sucesso.", 1); break; } case "todo": case "tarefas": case "tarefa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_todo")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_todo'.", 1); break; } ToDoManager.Initialize(); Session.SendWhisper("Lista de Tarefas recarregada com sucesso.", 1); break; } case "bounty": case "bl": case "bounties": case "recompensa": case "recompensas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bounty")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bounty'.", 1); break; } BountyManager.Initialize(); Session.SendWhisper("Lista de recompensas recarregada com sucesso.", 1); break; } case "court": case "jury": case "juiz": case "politica": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_court")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_court'.", 1); break; } RoleplayManager.CourtVoteEnabled = false; RoleplayManager.InnocentVotes = 0; RoleplayManager.GuiltyVotes = 0; RoleplayManager.CourtJuryTime = 0; RoleplayManager.CourtTrialIsStarting = false; RoleplayManager.CourtTrialStarted = false; RoleplayManager.Defendant = null; RoleplayManager.InvitedUsersToJuryDuty.Clear(); Session.SendWhisper("Juiz atualizado com sucesso.", 1); break; } case "chat": case "chats": case "chatroom": case "chatrooms": case "batepapos": case "batepapo": case "whatsapps": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_websocket_chat")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_websocket_chat'.", 1); break; } HabboRoleplay.Web.Util.ChatRoom.WebSocketChatManager.Initialiaze(); Session.SendWhisper("Salas de chat atualizadas com sucesso.", 1); break; } case "gambling": case "texash": case "texas": case "texasholdem": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_gambling")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_gambling'.", 1); break; } TexasHoldEmManager.Initialize(); Session.SendWhisper("Jogos do Texas Holdem atualizados com sucesso.", 1); break; } default: Session.SendWhisper("'" + UpdateVariable + "' não é uma coisa válida para recarregar.", 1); break; } }
public Game() { this._packetManager = new PacketManager(); this._clientManager = new GameClientManager(); this._modManager = new ModerationManager(); this._moderationTool = new ModerationTool(); this._itemDataManager = new ItemDataManager(); this._itemDataManager.Init(); this._catalogManager = new CatalogManager(); this._catalogManager.Init(this._itemDataManager); this._televisionManager = new TelevisionManager(); this._navigatorManager = new NavigatorManager(); this._roomManager = new RoomManager(); this._chatManager = new ChatManager(); this._questManager = new QuestManager(); this._achievementManager = new AchievementManager(); this._talentTrackManager = new TalentTrackManager(); this._landingViewManager = new LandingViewManager(); this._gameDataManager = new GameDataManager(); this._globalUpdater = new ServerStatusUpdater(); this._globalUpdater.Init(); this._languageLocale = new LanguageLocale(); this._antiMutant = new AntiMutant(); this._botManager = new BotManager(); this._cacheManager = new CacheManager(); this._rewardManager = new RewardManager(); this._badgeManager = new BadgeManager(); this._badgeManager.Init(); this._permissionManager = new PermissionManager(); this._permissionManager.Init(); this._subscriptionManager = new SubscriptionManager(); this._subscriptionManager.Init(); this._guideManager = new GuideManager(); int pollLoaded; this._pollManager = new PollManager(); this._pollManager.Init(out pollLoaded); #region Roleplay Section RoleplayData.Initialize(); EventManager.Initialize(); CombatManager.Initialize(); RoleplayGameManager.Initialize(); this._groupManager = new GroupManager(); this._groupManager.Initialize(); TexasHoldEmManager.Initialize(); TurfManager.Initialize(); WeaponManager.Initialize(); FoodManager.Initialize(); FarmingManager.Initialize(); CraftingManager.Initialize(); LotteryManager.Initialize(); ToDoManager.Initialize(); BlackListManager.Initialize(); BountyManager.Initialize(); WebSocketChatManager.Initialiaze(); this._houseManager = new HouseManager(); this._houseManager.Init(); this._webEventManager = new WebEventManager(); this._webEventManager.Init(); #endregion }
public DailyController() { DailyManager = new DailyManager(); BountyManager = new BountyManager(); }
/// <summary> /// Executes this type of combat /// </summary> public void Execute(GameClient Client, GameClient TargetClient, bool HitClosest = false) { if (!CanCombat(Client, TargetClient)) { return; } #region Variables RoomUser RoomUser = Client.GetRoomUser(); RoomUser TargetRoomUser = TargetClient.GetRoomUser(); int Damage = GetDamage(Client, TargetClient); Weapon Weapon = Client.GetRoleplay().EquippedWeapon; Point ClientPos = RoomUser.Coordinate; Point TargetClientPos = TargetRoomUser.Coordinate; #endregion #region Ammo Check if (Client.GetRoleplay().GunShots >= Weapon.ClipSize) { Weapon.Reload(Client, TargetClient); Client.GetRoleplay().CooldownManager.CreateCooldown("reload", 1000, Weapon.ReloadTime); return; } #endregion #region Distance Check double Distance = RoleplayManager.GetDistanceBetweenPoints2D(ClientPos, TargetClientPos); if (Distance > Weapon.Range) { RoleplayManager.Shout(Client, "*Tenta acertar o tiro em " + TargetClient.GetHabbo().Username + ", mas erra o alvo*", 4); Client.GetRoleplay().GunShots++; if (Client.GetRoleplay().Game == null) { Client.GetRoleplay().Bullets--; } return; } #endregion #region Target Death Procedure if (TargetClient.GetRoleplay().CurHealth - Damage <= 0) { Client.GetRoleplay().ClearWebSocketDialogue(); string Text = Weapon.FiringText.Split(':')[1]; string GunName = Weapon.PublicName; RoleplayManager.Shout(Client, FormatFiringText(Text, GunName, TargetClient.GetHabbo().Username, Damage, Weapon.Energy), 6); lock (PlusEnvironment.GetGame().GetClientManager().GetClients) { foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (client == null || client.GetHabbo() == null) { continue; } client.SendMessage(new RoomNotificationComposer("staff_notice", "message", "[Notícia Urgente] " + Client.GetHabbo().Username + " matou com tiros o cidadão " + TargetClient.GetHabbo().Username + ", tome cuidado pelas ruas!")); } } if (Client.GetRoleplay().LastKilled != TargetClient.GetHabbo().Id&& TargetClient.GetRoleplay().Game == null) { PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Client, QuestType.KILL_USER); PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Client, "ACH_Kills", 1); PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(TargetClient, "ACH_Death", 1); #region Player Stats Client.GetRoleplay().LastKilled = TargetClient.GetHabbo().Id; Client.GetRoleplay().Kills++; Client.GetRoleplay().GunKills++; if (GroupManager.HasJobCommand(TargetClient, "guide") && TargetClient.GetRoleplay().IsWorking) { TargetClient.GetRoleplay().CopDeaths++; } else { TargetClient.GetRoleplay().Deaths++; } if (!Client.GetRoleplay().WantedFor.Contains("cometer assassinato")) { Client.GetRoleplay().WantedFor = Client.GetRoleplay().WantedFor + "cometer assassinato, "; } #endregion #region Exp Calculator CryptoRandom Random = new CryptoRandom(); int Multiplier = 1; int Chance = Random.Next(1, 101); if (Chance <= 16) { if (Chance <= 8) { Multiplier = 3; } else { Multiplier = 2; } } LevelManager.AddLevelEXP(Client, GetEXP(Client, TargetClient) * Multiplier); #endregion #region Gang Stats Group Gang = GroupManager.GetGang(Client.GetRoleplay().GangId); Group TarGetGang = GroupManager.GetGang(TargetClient.GetRoleplay().GangId); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { if (Gang != null) { if (Gang.Id > 1000) { int ScoreIncrease = Random.Next(1, 11); Gang.GangKills++; Gang.GangScore += ScoreIncrease; dbClient.RunQuery("UPDATE `rp_gangs` SET `gang_kills` = '" + Gang.GangKills + "', `gang_score` = '" + Gang.GangScore + "' WHERE `id` = '" + Gang.Id + "'"); } } if (TarGetGang != null) { if (TarGetGang.Id > 1000) { TarGetGang.GangDeaths++; dbClient.RunQuery("UPDATE `rp_gangs` SET `gang_deaths` = '" + TarGetGang.GangDeaths + "' WHERE `id` = '" + TarGetGang.Id + "'"); } } } #endregion BountyManager.CheckBounty(Client, TargetClient.GetHabbo().Id); if ((TargetClient.GetRoleplay().CurHealth - Damage) <= 0) { TargetClient.GetRoleplay().CurHealth = 0; } } } #endregion #region Target Damage Procedure (Did not die) else { string Text = Weapon.FiringText.Split(':')[0]; string GunName = Weapon.PublicName; Client.GetRoleplay().OpenUsersDialogue(TargetClient); TargetClient.GetRoleplay().OpenUsersDialogue(Client); PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Client, QuestType.SHOOT_USER); RoleplayManager.Shout(Client, FormatFiringText(Text, GunName, TargetClient.GetHabbo().Username, Damage, Weapon.Energy), 6); } #endregion TargetClient.GetRoleplay().CurHealth -= Damage; if (Client.GetRoleplay().Game == null) { Client.GetRoleplay().Bullets--; } if (Client.GetRoleplay().Game == null) { Client.GetRoleplay().CurEnergy -= Weapon.Energy; } Client.GetRoleplay().GunShots++; if (!Client.GetRoleplay().WantedFor.Contains("tentativa de assaltSo + tentativa/assassinato")) { Client.GetRoleplay().WantedFor = Client.GetRoleplay().WantedFor + "tentativa de assalto + tentativa/assassinato "; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Opa, você esqueceu de inserir um nome de usuário!", 1); return; } GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocorreu um erro ao tentar encontrar esse usuário, talvez ele esteja offline.", 1); return; } if (Session.GetRoleplay().TryGetCooldown("addrecompensa")) { return; } if (Session.GetRoleplay().Level < 3) { Session.SendWhisper("Você deve ser ao menos nível 3 para definir recompensas!", 1); return; } if (TargetClient.GetRoleplay().Level < 3) { Session.SendWhisper(TargetClient.GetHabbo().Username + " O nível é muito baixo para definir uma recompensa! Ele deve ser pelo menos nível 3!", 1); return; } if (TargetClient.GetRoleplay().IsDead) { Session.SendWhisper("Você não pode definir uma recompensa em alguém que está morto!", 1); return; } if (TargetClient.GetRoleplay().IsJailed) { Session.SendWhisper("Você não pode definir uma recompensa em alguém que está preso!", 1); return; } if (TargetClient == Session) { Session.SendWhisper("Você não pode definir uma recompensa em si mesmo!", 1); return; } var BountyList = BountyManager.BountyUsers; int Amount; if (Params.Length < 3) { Session.SendWhisper("Comando inválido! Use :addrecompensa <usuário> <quantidade do pagamento>", 1); return; } if (int.TryParse((Params[2]), out Amount)) { if (BountyList.ContainsKey(TargetClient.GetHabbo().Id)) { Session.SendWhisper(TargetClient.GetHabbo().Username + " já está na lista de recompensas!", 1); return; } if (Amount <= 0) { Session.SendWhisper("Por favor insira uma quantia válida de dinheiro!", 1); return; } if (Amount < 50) { Session.SendWhisper("O valor mínimo de recompensa é de R$50!", 1); return; } if (Session.GetHabbo().Credits < Amount) { Session.SendWhisper("Você não tem R$" + String.Format("{0:N0}", Amount) + " para pagar a recompensas!", 1); return; } Bounty NewBounty = new Bounty(TargetClient.GetHabbo().Id, Session.GetHabbo().Id, Amount, PlusEnvironment.GetUnixTimestamp(), PlusEnvironment.GetUnixTimestamp() + 3600); BountyManager.AddBounty(NewBounty); Session.Shout("*Coloca uma recompensa de R$" + String.Format("{0:N0}", Amount) + " para quem matar o vagabundo " + TargetClient.GetHabbo().Username + "*", 4); Session.GetHabbo().Credits -= Amount; Session.GetHabbo().UpdateCreditsBalance(); Session.GetRoleplay().CooldownManager.CreateCooldown("addrecompensa", 1000, 5); } else { Session.SendWhisper("Por favor insira um número válido!", 1); } }
void Start() { bountyManager_ = BountyManager._instance; SetText(); }
/// <summary> /// Executes this type of combat /// </summary> public void Execute(GameClient Client, GameClient TargetClient, bool HitClosest = false) { RoomUser User; if (HitClosest) { if (!this.TryGetClosestTarget(Client, out User)) { return; } if (User == null) { return; } if (User.IsBot && User.GetBotRoleplay() != null) { this.ExecuteBot(Client, User.GetBotRoleplay()); return; } else { TargetClient = User.GetClient(); } } if (!this.CanCombat(Client, TargetClient)) { return; } int Damage = this.GetDamage(Client, TargetClient); // If the user is about to die and the user attacked themself if ((TargetClient.GetRoleplay().CurHealth - Damage) <= 0 && TargetClient == Client) { TargetClient.SendWhisper("Você não pode se matar!", 1); return; } // If about to die if (TargetClient.GetRoleplay().CurHealth - Damage <= 0) { if (TargetClient.GetRoleplay().Game != null) { if (TargetClient.GetRoleplay().Game.GetGameMode() == GameMode.Brawl) { RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", causando " + Damage + " damage*", 6); RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", matando-o e vencendo o Evento de Brigas! [+1 Ponto de Evento]*", 6); Client.GetHabbo().EventPoints++; Client.GetHabbo().UpdateEventPointsBalance(); } else if (TargetClient.GetRoleplay().Game.GetGameMode() == GameMode.SoloQueue || TargetClient.GetRoleplay().Game.GetGameMode() == GameMode.SoloQueueGuns) { RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", causando " + Damage + " damage*", 6); RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", matando-o e vencendo o Evento Soloqueue!*", 6); } } else { Client.GetRoleplay().ClearWebSocketDialogue(); int Amount = this.GetCoins(TargetClient); this.GetRewards(Client, TargetClient, null); Client.GetHabbo().Credits += Amount; Client.GetHabbo().UpdateCreditsBalance(); TargetClient.GetHabbo().Credits -= Amount; TargetClient.GetHabbo().UpdateCreditsBalance(); if (Amount > 0) { RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", causando " + Damage + " damage*", 6); RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", matando-o e roubando R$" + String.Format("{0:N0}", Amount) + " da carteira dele*", 6); lock (PlusEnvironment.GetGame().GetClientManager().GetClients) { foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (client == null || client.GetHabbo() == null) { continue; } client.SendMessage(new RoomNotificationComposer("staff_notice", "message", "[Notícia Urgente] " + Client.GetHabbo().Username + " matou com socos o cidadão " + TargetClient.GetHabbo().Username + " e roubou R$" + String.Format("{0:N0}", Amount) + " da carteira dele, tome cuidado pelas ruas!")); } } } else { RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", causando " + Damage + " damage*", 6); RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", matando-o*", 6); lock (PlusEnvironment.GetGame().GetClientManager().GetClients) { foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (client == null || client.GetHabbo() == null) { continue; } client.SendMessage(new RoomNotificationComposer("staff_notice", "message", "[Notícia Urgente] " + Client.GetHabbo().Username + " matou com socos o cidadão " + TargetClient.GetHabbo().Username + ", tome cuidado pelas ruas!")); } } } BountyManager.CheckBounty(Client, TargetClient.GetHabbo().Id); if ((TargetClient.GetRoleplay().CurHealth - Damage) <= 0) { TargetClient.GetRoleplay().CurHealth = 0; } } } else { RoleplayManager.Shout(Client, "*Dá um soco em " + TargetClient.GetHabbo().Username + ", causando " + Damage + " damage*", 6); Client.GetRoleplay().OpenUsersDialogue(TargetClient); TargetClient.GetRoleplay().OpenUsersDialogue(Client); } if (TargetClient != Client) { PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Client, "ACH_Punching", 1); PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Client, QuestType.PUNCH_USER, 1); } if (Client.GetRoleplay().Game == null) { if ((Client.GetRoleplay().CurEnergy - 2) <= 0) { Client.GetRoleplay().CurEnergy = 0; } else { Client.GetRoleplay().CurEnergy -= 2; } } if (TargetClient.GetRoleplay().CurHealth - Damage <= 0) { TargetClient.GetRoleplay().CurHealth = 0; } else { TargetClient.GetRoleplay().CurHealth -= Damage; } Client.GetRoleplay().Punches++; if (!Client.GetRoleplay().WantedFor.Contains("tentativa de assalto + tentativa/assassinato")) { Client.GetRoleplay().WantedFor = Client.GetRoleplay().WantedFor + "tentativa de assalto + tentativa/assassinato, "; } Client.GetRoleplay().CooldownManager.CreateCooldown("fist", 1000, (Client.GetRoleplay().Game == null ? (Client.GetRoleplay().Class.ToLower() == "fighter" ? RoleplayManager.HitCooldown : RoleplayManager.DefaultHitCooldown) : RoleplayManager.HitCooldownInEvent)); }