Grillo1995
New Member
I have a very annoying problem, when a player summons a waste on the server, when killing the summom he gains EXP and Loot, the summon's body does not SOME !!!
I have already reviewed data / lib / core / creature.lua
Magic script
Here is the source code C++: Dont work POFF :/
EDIT:
for fix this bug go to in your source : /src/creature.h
And edit
Change to:
Goodbye.
I have already reviewed data / lib / core / creature.lua
Magic script
Here is the source code C++: Dont work POFF :/
C++:
bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
if (!lootDrop && getMonster()) {
if (master) {
//scripting event - onDeath
const CreatureEventList& deathEvents = getCreatureEvents(CREATURE_EVENT_DEATH);
for (CreatureEvent* deathEvent : deathEvents) {
deathEvent->executeOnDeath(this, nullptr, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
}
g_game.addMagicEffect(getPosition(), CONST_ME_POFF);
} else {
Item* splash;
switch (getRace()) {
case RACE_VENOM:
splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_SLIME);
break;
case RACE_BLOOD:
splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_BLOOD);
break;
default:
splash = nullptr;
break;
}
Tile* tile = getTile();
if (splash) {
g_game.internalAddItem(tile, splash, INDEX_WHEREEVER, FLAG_NOLIMIT);
g_game.startDecay(splash);
}
Item* corpse = getCorpse(lastHitCreature, mostDamageCreature);
if (corpse) {
g_game.internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);
g_game.startDecay(corpse);
}
//scripting event - onDeath
for (CreatureEvent* deathEvent : getCreatureEvents(CREATURE_EVENT_DEATH)) {
deathEvent->executeOnDeath(this, corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
if (corpse) {
dropLoot(corpse->getContainer(), lastHitCreature);
}
}
return true;
}
EDIT:
for fix this bug go to in your source : /src/creature.h
And edit
Code:
void setDropLoot(bool lootDrop) {
lootDrop = lootDrop;
}
void setSkillLoss(bool skillLoss) {
skillLoss = skillLoss;
}
Change to:
Code:
void setDropLoot(bool lootDrop) {
this->lootDrop = lootDrop;
}
void setSkillLoss(bool skillLoss) {
this->skillLoss = skillLoss;
}
Goodbye.
Last edited: