Holds all conditions of a creature.
"Extra" values are information about conditions that are stored in MabiDictionaries, they appear after the actual conditions in the ConditionUpdate packet. An example of such a condition is ConditionsC.Hurry, which is used to modify your movement speed. To set those values, prepare a MabiDictionary before calling Activate and pass it as the optional "extra" value. They are removed automatically on deactivating.
Exemplo n.º 1
0
		public static Packet AddConditions(this Packet packet, CreatureConditions conditions)
		{
			packet.PutULong((ulong)conditions.A);
			packet.PutULong((ulong)conditions.B);
			packet.PutULong((ulong)conditions.C);
			// [150100] New conditions list
			{
				packet.PutULong((ulong)conditions.D);
			}
			// [180300, NA169 (23.10.2013)] New conditions list
			{
				packet.PutULong((ulong)conditions.E);
			}
			// [190100, NA201 (14.02.2015)] New conditions list
			{
				packet.PutULong((ulong)conditions.F);
			}
			// [200100, NA229 (2016-06-16)] New conditions list
			{
				packet.PutULong((ulong)conditions.G);
			}

			// List of additional values for the conditions
			var extra = conditions.GetExtraList();
			packet.PutInt(extra.Count);
			foreach (var e in extra)
			{
				packet.PutInt(e.Key);
				packet.PutString(e.Value.ToString());
			}

			// [180100] ? (old: Zero Talent?)
			{
				// This might not be part of the conditions, but we need that
				// long in both cases (5209 and update).
				packet.PutLong(0);
			}

			return packet;
		}