mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-01 18:19:20 +02:00
Merge branch '10-introduce-loot-opening-for-player-or-party-who-deal-the-most-amount-of-damage' into 'master'
Resolve "Introduce loot opening for player or party who deal the most amount of damage" Closes #10 See merge request ErikasKontenis/Sabrehaven!12
This commit is contained in:
commit
5640c1497d
@ -712,6 +712,7 @@ bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreatur
|
||||
if (corpse) {
|
||||
g_game.internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);
|
||||
g_game.startDecay(corpse);
|
||||
g_scheduler.addEvent(createSchedulerTask(10000, std::bind(&Game::RemoveCorpseOwner, &g_game, corpse)));
|
||||
}
|
||||
|
||||
//scripting event - onDeath
|
||||
|
@ -3762,6 +3762,11 @@ void Game::internalDecayItem(Item* item)
|
||||
}
|
||||
}
|
||||
|
||||
void Game::RemoveCorpseOwner(Item* item)
|
||||
{
|
||||
item->removeAttribute(ITEM_ATTRIBUTE_CORPSEOWNER);
|
||||
}
|
||||
|
||||
void Game::checkDecay()
|
||||
{
|
||||
g_scheduler.addEvent(createSchedulerTask(EVENT_DECAYINTERVAL, std::bind(&Game::checkDecay, this)));
|
||||
|
@ -485,7 +485,7 @@ class Game
|
||||
void setBedSleeper(BedItem* bed, uint32_t guid);
|
||||
void removeBedSleeper(uint32_t guid);
|
||||
bool reload(ReloadTypes_t reloadType);
|
||||
|
||||
void Game::RemoveCorpseOwner(Item* item);
|
||||
Groups groups;
|
||||
Map map;
|
||||
Raids raids;
|
||||
|
Loading…
x
Reference in New Issue
Block a user