Mooege.Core.GS.Items.Item.Reveal C# (CSharp) Method

Reveal() public method

public Reveal ( Player player ) : bool
player Player
return bool
        public override bool Reveal(Player player)
        {
            if (this.CurrentState == ItemState.PickingUp && HasWorldLocation)
                return false;

            if (!base.Reveal(player))
                return false;

            var affixGbis = new int[AffixList.Count];
            for (int i = 0; i < AffixList.Count; i++)
            {
                affixGbis[i] = AffixList[i].AffixGbid;
            }

            player.InGameClient.SendMessage(new AffixMessage()
            {
                ActorID = DynamicID,
                Field1 = 0x00000001,
                aAffixGBIDs = affixGbis,
            });

            player.InGameClient.SendMessage(new AffixMessage()
            {
                ActorID = DynamicID,
                Field1 = 0x00000002,
                aAffixGBIDs = new int[0],
            });

            return true;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Visually adds rune to skill (move from backpack to runes' slot)
 /// </summary>
 /// <param name="rune"></param>
 /// <param name="powerSNOId"></param>
 /// <param name="skillIndex"></param>
 public void SetRune(Item rune, int powerSNOId, int skillIndex)
 {
     if ((skillIndex < 0) || (skillIndex > 5))
     {
         return;
     }
     if (rune == null)
     {
         _skillSocketRunes[skillIndex] = 0;
         return;
     }
     if (_inventoryGrid.Items.ContainsKey(rune.DynamicID))
     {
         _inventoryGrid.RemoveItem(rune);
     }
     else
     {
         // unattuned rune changes to attuned w/o getting into inventory
         rune.World.Leave(rune);
         rune.Reveal(_owner);
     }
     _equipment.Items.Add(rune.DynamicID, rune);
     _skillSocketRunes[skillIndex] = rune.DynamicID;
     // will set only one of these to rank
     _owner.Attributes[GameAttribute.Rune_A, powerSNOId] = rune.Attributes[GameAttribute.Rune_A];
     _owner.Attributes[GameAttribute.Rune_B, powerSNOId] = rune.Attributes[GameAttribute.Rune_B];
     _owner.Attributes[GameAttribute.Rune_C, powerSNOId] = rune.Attributes[GameAttribute.Rune_C];
     _owner.Attributes[GameAttribute.Rune_D, powerSNOId] = rune.Attributes[GameAttribute.Rune_D];
     _owner.Attributes[GameAttribute.Rune_E, powerSNOId] = rune.Attributes[GameAttribute.Rune_E];
     // position of rune is read from mpq as INDEX of skill in skill kit - loaded in helper /xsochor
     rune.SetInventoryLocation(15, RuneHelper.GetRuneIndexForPower(powerSNOId), 0);
 }