Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
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);
         }
     }
 }
Exemplo n.º 5
0
 public void RemoveLooter(ObjectGuid guid)
 {
     PlayersLooting.Remove(guid);
 }
Exemplo n.º 6
0
 public void AddLooter(ObjectGuid guid)
 {
     PlayersLooting.Add(guid);
 }