public void NotifyQuestItemRemoved(byte questIndex) { // when a free for all questitem is looted // all players will get notified of it being removed // (other questitems can be looted by each group member) // bit inefficient but isn't called often for (var i = 0; i < PlayersLooting.Count; ++i) { Player player = Global.ObjAccessor.FindPlayer(PlayersLooting[i]); if (player) { var pql = PlayerQuestItems.LookupByKey(player.GetGUID()); if (!pql.Empty()) { byte j; for (j = 0; j < pql.Count; ++j) { if (pql[j].index == questIndex) { break; } } if (j < pql.Count) { player.SendNotifyLootItemRemoved(GetGUID(), (byte)(items.Count + j)); } } } else { PlayersLooting.RemoveAt(i); } } }
public void NotifyMoneyRemoved() { // notify all players that are looting this that the money was removed for (var i = 0; i < PlayersLooting.Count; ++i) { Player player = Global.ObjAccessor.FindPlayer(PlayersLooting[i]); if (player != null) { player.SendNotifyLootMoneyRemoved(GetGUID()); } else { PlayersLooting.RemoveAt(i); } } }
public void clear() { PlayerQuestItems.Clear(); PlayerFFAItems.Clear(); PlayerNonQuestNonFFAConditionalItems.Clear(); PlayersLooting.Clear(); items.Clear(); quest_items.Clear(); gold = 0; unlootedCount = 0; roundRobinPlayer = ObjectGuid.Empty; i_LootValidatorRefManager.clearReferences(); _itemContext = 0; }
public void NotifyItemRemoved(byte lootIndex) { // notify all players that are looting this that the item was removed // convert the index to the slot the player sees for (int i = 0; i < PlayersLooting.Count; ++i) { Player player = Global.ObjAccessor.FindPlayer(PlayersLooting[i]); if (player != null) { player.SendNotifyLootItemRemoved(GetGUID(), lootIndex); } else { PlayersLooting.RemoveAt(i); } } }
public void RemoveLooter(ObjectGuid guid) { PlayersLooting.Remove(guid); }
public void AddLooter(ObjectGuid guid) { PlayersLooting.Add(guid); }