public static void DespawnNPC(ulong target, DespawnType type) { NearbyNPC.Remove(target); WindowManager.BossWindow.VM.RemoveBoss(target, type); if (WindowManager.BossWindow.VM.VisibleBossesCount == 0) { SessionManager.Encounter = false; WindowManager.GroupWindow.VM.SetAggro(0); } ClassAbnormalityTracker.CheckMarkingOnDespawn(target); FlyingGuardianDataProvider.InvokeProgressChanged(); }
public static void DespawnNPC(ulong target, DespawnType type) { if (NearbyNPC.ContainsKey(target)) { NearbyNPC.Remove(target); } BossGageWindowViewModel.Instance.RemoveBoss(target, type); if (BossGageWindowViewModel.Instance.VisibleBossesCount == 0) { SessionManager.Encounter = false; GroupWindowViewModel.Instance.SetAggro(0); } ClassAbnormalityTracker.CheckMarkingOnDespawn(target); FlyingGuardianDataProvider.InvokeProgressChanged(); }
public static void SpawnNPC(ushort zoneId, uint templateId, ulong entityId, bool v, bool villager, int remainingEnrageTime) { CheckHarrowholdMode(zoneId, templateId); if (IsWorldBoss(zoneId, templateId)) { SessionManager.DB.MonsterDatabase.TryGetMonster(templateId, zoneId, out var monst); if (monst.IsBoss) { var msg = new ChatMessage(ChatChannel.WorldBoss, "System", $"<font>{monst.Name}</font><font size=\"15\" color=\"#cccccc\"> is nearby.</font>"); ChatWindowManager.Instance.AddChatMessage(msg); } } if (!Filter(zoneId, templateId)) { return; } if (SessionManager.DB.MonsterDatabase.TryGetMonster(templateId, zoneId, out var m)) { NearbyNPC[entityId] = m.Name; //if (m.Name == "Tradon") ChatWindowManager.Instance.AddChatMessage(new ChatMessage(ChatChannel.TCC, "TCC", "Tradon spawned") { ContainsPlayerName = true }); //if (m.Name == "Garash Bloodtusk") ChatWindowManager.Instance.AddChatMessage(new ChatMessage(ChatChannel.TCC, "TCC", "Garash Bloodtusk spawned") { ContainsPlayerName = true }); FlyingGuardianDataProvider.InvokeProgressChanged(); if (villager) { return; } if (m.IsBoss) { WindowManager.BossWindow.VM.AddOrUpdateBoss(entityId, m.MaxHP, m.MaxHP, m.IsBoss, HpChangeSource.CreatureChangeHp, templateId, zoneId, v); WindowManager.BossWindow.VM.SetBossEnrageTime(entityId, remainingEnrageTime); } else { if (Settings.SettingsHolder.ShowOnlyBosses) { return; } WindowManager.BossWindow.VM.AddOrUpdateBoss(entityId, m.MaxHP, m.MaxHP, m.IsBoss, HpChangeSource.CreatureChangeHp, templateId, zoneId, false); WindowManager.BossWindow.VM.SetBossEnrageTime(entityId, remainingEnrageTime); } } }
public static void SpawnNPC(ushort zoneId, uint templateId, ulong entityId, bool v, bool villager) { CheckHarrowholdMode(zoneId, templateId); if (IsWorldBoss(zoneId, templateId)) { SessionManager.MonsterDatabase.TryGetMonster(templateId, zoneId, out var monst); if (monst.IsBoss) { var msg = new ChatMessage(ChatChannel.WorldBoss, "System", $"<font>{monst.Name}</font><font size=\"15\" color=\"#cccccc\"> is nearby.</font>"); ChatWindowManager.Instance.AddChatMessage(msg); } } if (!Filter(zoneId, templateId)) { return; } if (SessionManager.MonsterDatabase.TryGetMonster(templateId, zoneId, out var m)) { NearbyNPC[entityId] = m.Name; FlyingGuardianDataProvider.InvokeProgressChanged(); if (villager) { return; } if (m.IsBoss) { BossGageWindowViewModel.Instance.AddOrUpdateBoss(entityId, m.MaxHP, m.MaxHP, m.IsBoss, HpChangeSource.CreatureChangeHp, templateId, zoneId, v); } else { if (Settings.SettingsHolder.ShowOnlyBosses) { return; } BossGageWindowViewModel.Instance.AddOrUpdateBoss(entityId, m.MaxHP, m.MaxHP, m.IsBoss, HpChangeSource.CreatureChangeHp, templateId, zoneId, false); } } }