/// <summary> /// Checks which nodes are currently activated by the player and sends the results to the client. /// </summary> public static void TalkToFM(this NPC taxiVendor, Character chr) { if (!taxiVendor.CheckVendorInteraction(chr)) { return; } PathNode vendorTaxiNode = taxiVendor.VendorTaxiNode; if (vendorTaxiNode == null) { return; } TaxiNodeMask taxiNodes = chr.TaxiNodes; if (!taxiNodes.IsActive(vendorTaxiNode)) { if (chr.GodMode) { chr.ActivateAllTaxiNodes(); } else { taxiNodes.Activate(vendorTaxiNode); TaxiHandler.SendTaxiPathActivated(chr.Client); TaxiHandler.SendTaxiPathUpdate((IPacketReceiver)chr.Client, taxiVendor.EntityId, true); return; } } chr.OnInteract((WorldObject)taxiVendor); TaxiHandler.ShowTaxiList(chr, (IEntity)taxiVendor, vendorTaxiNode); }
protected override void Apply(WorldObject target, ref DamageAction[] actions) { Character character = target as Character; character.TaxiNodes.Activate((uint)this.Effect.MiscValue); TaxiHandler.SendTaxiPathActivated(character.Client); TaxiHandler.SendTaxiPathUpdate((IPacketReceiver)character.Client, this.Cast.CasterUnit.EntityId, true); }
protected override void Apply(WorldObject target) { var chr = target as Character; chr.TaxiNodes.Activate((uint)Effect.MiscValue); TaxiHandler.SendTaxiPathActivated(chr.Client); TaxiHandler.SendTaxiPathUpdate(chr.Client, Cast.CasterUnit.EntityId, true); }
/// <summary> /// Checks which nodes are currently activated by the player and sends the results to the client. /// </summary> public static void TalkToFM(this NPC taxiVendor, Character chr) { if (!taxiVendor.CheckVendorInteraction(chr)) { return; } // Get the taxi node associated with this Taxi Vendor var curNode = taxiVendor.VendorTaxiNode; if (curNode == null) { return; } // If this taxi node is as yet unknown to the player, activate it for them. var nodeMask = chr.TaxiNodes; if (!nodeMask.IsActive(curNode)) { if (chr.GodMode) { chr.ActivateAllTaxiNodes(); } else { nodeMask.Activate(curNode); TaxiHandler.SendTaxiPathActivated(chr.Client); TaxiHandler.SendTaxiPathUpdate(chr.Client, taxiVendor.EntityId, true); // apparently the blizz-like activity is to not send the taxi list until the next // vendor interaction. So we'll ditch this taco stand. return; } } chr.OnInteract(taxiVendor); // The character has previously activated this TaxiNode, send the known nodes list to the client TaxiHandler.ShowTaxiList(chr, taxiVendor, curNode); }