Stellow
C++/C#/PHP/LUA
I am trying to implement a system which players can conjure runes with the blank rune on their backpack.
The part of the code i am trying to edit is here:
and
On this specific one, he can conjure on left hand....
ideas?
The part of the code i am trying to edit is here:
Code:
ReturnValue result = RET_NOERROR;
if (spell->getReagentId() != 0){
//Test if we can cast the conjure spell on left hand
ReturnValue result1 = internalConjureItem(player, spell->getConjureId(), spell->getConjureCount(),
spell->getReagentId(), SLOT_LEFT, true);
if (result1 == RET_NOERROR){
//Check level/mana etc.
if (!spell->playerSpellCheck(player)){
return false;
}
result1 = internalConjureItem(player, spell->getConjureId(), spell->getConjureCount(),
spell->getReagentId(), SLOT_LEFT);
if (result1 == RET_NOERROR){
spell->postCastSpell(player, false);
}
}
and
Code:
if (reagentId != 0){
Item* item = player->getInventoryItem(slot);
if (item && item->getID() == reagentId){
if (item->isStackable() && item->getItemCount() != 1){ //TODO? reagentCount
return RET_YOUNEEDTOSPLITYOURSPEARS;
}
if (test){
return RET_NOERROR;
}
Item* newItem = g_game.transformItem(item, conjureId, conjureCount);
if (newItem){
g_game.startDecay(newItem);
}
player->updateInventoryWeight();
return RET_NOERROR;
}
}
player->updateInventoryWeight();
return RET_YOUNEEDAMAGICITEMTOCASTSPELL;
ideas?