View Single Post
  #2  
Old 02-16-2012, 01:37 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Quote:
Originally Posted by Noport View Post
just for grins try this opcode OP_LootComplete=0x528f see if that helps
while i've not used perl to send packets to clients, i'm not sure how it would help in this case. please explain.

UPDATE: i wrote the following test plugin to make absolutely certain the issue wasn't with the slot numbers

Code:
sub DeleteAllLoot {

    my $corpse      = NULL;
    my $npc         = plugin::val('$npc');
    my $entity_list = plugin::val('$entity_list');

    foreach $corpse ($entity_list->GetCorpseList()) {
        if ($corpse->GetOwnerName() eq $npc->GetName() && $corpse->CountItems()) {
            for (my $slot = 0; $slot >= $corpse->CountItems(); $slot++) {
                $corpse->RemoveItem($slot);
            }
            return 1;
        }
    }

    return 0;

}
i know it's finding the correct corpse, but RemoveItem() is not deleting any items from NPC corpses.
Reply With Quote