Jump to content

Recommended Posts

  • 40 years later...
Posted

player.cpp

void Player::ResurectUsingRequestData()
{
   /// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
   if(IS_PLAYER_GUID(m_resurrectGUID))
       TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());

   //we cannot resurrect player when we triggered far teleport
   //player will be resurrected upon teleportation
   if(IsBeingTeleportedFar())
   {
       ScheduleDelayedOperation(DELAYED_RESURRECT_PLAYER);
       return;
   }

   ResurrectPlayer(0.0f,false);

   if(GetMaxHealth() > m_resurrectHealth)
       SetHealth( m_resurrectHealth );
   else
       SetHealth( GetMaxHealth() );

   if(GetMaxPower(POWER_MANA) > m_resurrectMana)
       SetPower(POWER_MANA, m_resurrectMana );
   else
       SetPower(POWER_MANA, GetMaxPower(POWER_MANA) );

   SetPower(POWER_RAGE, 0 );

   SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY) );

// peter loot

[color="Red"] 
Corpse *bones = sObjectAccessor.ConvertCorpseForPlayer(GetGUID(),true);
    bones->SetFlag(CORPSE_FIELD_DYNAMIC_FLAGS, CORPSE_DYNFLAG_LOOTABLE);
    bones->loot.gold = getLevel();
    bones->lootRecipient = this;
    SendLoot(bones->GetGUID(), LOOT_INSIGNIA);
[/color]
   SpawnCorpseBones();
       sLog.outDebug("loot player test", this);



}

id like to make players drop always some items and gold, not just in pvp, for test purposes lootable from both fractions

what i added compiled but showed now function ingame... is the code wrong? or just in the wrong place?

Guest
This topic is now 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