/// <summary> /// Character starts a trade-session with this Vendor /// </summary> /// <param name="chr"></param> public void UseVendor(Character chr) { if (!CheckVendorInteraction(chr)) return; chr.OnInteract(NPC); NPCHandler.SendVendorInventoryList(chr, NPC, ItemsForSale); }
public static void StartQuestDialog(this IQuestHolder qHolder, Character chr) { chr.OnInteract(qHolder as WorldObject); var list = qHolder.QuestHolderInfo.GetAvailableQuests(chr); if (list.Count > 0) { if (list.Count == 1 && !chr.QuestLog.HasActiveQuest(list[0].Id)) { // start a single quest if there is only one and the user did not start it yet var autoAccept = list[0].Flags.HasFlag(QuestFlags.AutoAccept); QuestHandler.SendDetails(qHolder, list[0], chr, !autoAccept); if (autoAccept) { chr.QuestLog.TryAddQuest(list[0], qHolder); } } else { QuestHandler.SendQuestList(qHolder, list, chr); } } }
/// <summary> /// /// </summary> /// <param name="bm"></param> /// <param name="chr"></param> public static void TalkToBattlemaster(this NPC bm, Character chr) { chr.OnInteract(bm); BattlegroundTemplate templ = bm.Entry.BattlegroundTemplate; if (templ != null) { GlobalBattlegroundQueue queue = templ.GetQueue(chr.Level); if (queue != null) { BattlegroundHandler.SendBattlefieldList(chr, queue); } } }