All pastes #632511 Raw Edit

Mine

public text v1 · immutable
#632511 ·published 2007-07-24 22:17 UTC
rendered paste body
        public bool PickUpCorpseWait()
        {
            // Corpse doesn't exist, or was already picked up
            if (this.Hero.CorpseUID == 0)
                return true;

            this.Diablo.Sender.SendToGameClient(new GameClient.UnitInteract(UnitType.NPC, this.Hero.CorpseUID).Data);

            PacketConfirmation confirmation = delegate(object packet)
                {
                    GameServer.RemoveGroundUnit groundUnit = packet as GameServer.RemoveGroundUnit;

                    if (groundUnit.UID != this.Hero.CorpseUID)
                    {
                        // Corpse no longer exists now, set to 0
                        this.Hero.CorpseUID = 0;
                        return true;
                    }
                    else
                        return false;
                };

            return this.WaitForPacket(GameServerPacket.RemoveGroundUnit, confirmation, 5000);
        }