eu nao intendi essa parte aqui
e pra termina na funçao
CODE
void Player::dropLoot(Container* corpse)
depois de
CODE
if(corpse && lootDrop){
for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){
Item* item = inventory;
adicione
CODE
#ifdef __PREVENT_LOSS__
if(item && item->isPreventLoss() && getSkull() != SKULL_RED){
if(item->isPreventLossItemRemovable())
g_game.internalRemoveItem(item, 1);
return;
}
#endif
em qual arquivo seria isto?




info
Grupo: Campones
Registrado: 07/01/06
Posts: 86
Reputação: +1
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
adicione
#ifdef __PREVENT_LOSS__ bool isPreventLoss() const {return items[id].preventLoss != 0;} bool isPreventLossItemRemovable() const {return items[id].isPreventLossItemRemovable != 0;} #endifagora em items.cpp abaixo de
adicione
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; } } #endifem items.h abaixo de
adicione
e pra termina em player.cpp na funçao
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; } #endifProject >> Project Options >> Parameters >> C++ Compiler >> -D__PREVENT_LOSS__
REBUILD ALL
Exemplo de como usar em items.xml
bom é isso ae pessoal qualquer duvidas ou bugs reportem aqui
flw
Editado Outubro 4 por Fusion32