Jump to content

Setlootrecipient method issue


Recommended Posts

Posted

Hey there,

For the encounter "Bug trio" in AQ40, there is a method that is called each time one of them dies that prevents loot appearing for the player on the corpse.

Example:

m_creature->SetLootRecipient(NULL);

However this seems to be doing absolutely nothing. I know the code is being executed because I put "script_error_log("Bug trio loot prevented + despawned");" in the if statement and its printing that in the console. 

I have tried testing it with a non GM account and it is still dropping loot, is there something wrong with this method?

Posted

So I figured out that the method was missing 1 line of code that has seemed to have fixed it.

In Creature.cpp:

void Creature::SetLootRecipient(Unit *unit):

if (!unit) statement was missing: RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED | UNIT_DYNFLAG_LOOTABLE);

Example:

if (!unit)
{
  m_lootRecipientGuid.Clear();
  m_lootGroupRecipientId = 0;
  RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED | UNIT_DYNFLAG_LOOTABLE);
  return;
}

 

  • madmax locked this topic

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use