eae pessoal eu notei ja q o svn nao tem o comando preventLoss q eh necessario no amulet of loss entao vamos ao codigo
em item.h abaixo de
virtual void __startDecaying();
adicione
#ifdef __PREVENT_LOSS__ bool isPreventLoss() const {return items[id].preventLoss != 0;} bool isPreventLossItemRemovable() const {return items[id].isPreventLossItemRemovable != 0;} #endif
agora em items.cpp abaixo de
replaceable = true;
adicione
#ifdef __PREVENT_LOSS__ preventLoss = 0; isPreventLossItemRemovable = false; #endif
e abaixo de
else if(strcasecmp(strValue.c_str(), "noSleeper") == 0) { if(readXMLInteger(itemAttributesNode, "value", intValue)) { it.noSleeperID = intValue; } }
adicione
#ifdef __PREVENT_LOSS__ else if(strcasecmp(strValue.c_str(), "preventLoss") == 0) { if(readXMLInteger(itemAttributesNode, "value", intValue)){ it.preventLoss = intValue; } if(readXMLInteger(itemAttributesNode, "remove", intValue)){ it.isPreventLossItemRemovable = intValue; } } #endif
em items.h abaixo de
bool replaceable;
adicione
#ifdef __PREVENT_LOSS__ int preventLoss; bool isPreventLossItemRemovable; #endif
e pra termina em player.cpp na funçao
void Player::dropLoot(Container* corpse)
depois de
if(corpse && lootDrop){ for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){ Item* item = inventory[i];
adicione
#ifdef __PREVENT_LOSS__ if(item && item->isPreventLoss() && getSkull() != SKULL_RED){ if(item->isPreventLossItemRemovable()) g_game.internalRemoveItem(item, 1); return; } #endif
Project >> Project Options >> Parameters >> C++ Compiler >> -D__PREVENT_LOSS__
REBUILD ALL
Exemplo de como usar em items.xml
<attribute key="preventLoss" value="1" <!-- QUALQUER VALOR DIFERENTE DE 0 SERA INTERPRETADO COMO ATIVADO --> remove="1" <!-- SE IRA REMOVER OU NAO O ITEM APOS A MORTE --> />
bom é isso ae pessoal qualquer duvidas ou bugs reportem aqui
flw