Ejemplo n.º 1
0
        public unsafe EffectEntry GetEffectEntryFromBytes(byte[] source, int num = 0)
        {
            uint mycharID = 0;


            Combatant mychar = GetSelfCombatant();

            if (mychar != null)
            {
                mycharID = mychar.ID;
            }

            fixed(byte *p = source)
            {
                EffectMemory mem = *(EffectMemory *)&p[num * EffectMemory.Size];

                EffectEntry effectEntry = new EffectEntry()
                {
                    BuffID  = mem.BuffID,
                    Stack   = mem.Stack,
                    Timer   = mem.Timer,
                    ActorID = mem.ActorID,
                    isOwner = mem.ActorID == mycharID,
                };

                return(effectEntry);
            }
        }
Ejemplo n.º 2
0
        public unsafe EffectEntry GetEffectEntryFromBytes(byte[] source, int num = 0)
        {
            fixed(byte *p = source)
            {
                EffectMemory mem = *(EffectMemory *)&p[num * EffectMemory.Size];

                EffectEntry effectEntry = new EffectEntry()
                {
                    BuffID  = mem.BuffID,
                    Stack   = mem.Stack,
                    Timer   = mem.Timer,
                    ActorID = mem.ActorID,
                    isOwner = false,
                };

                return(effectEntry);
            }
        }