xLosT
Member
how can I put black skull summon monster
and add to not able to summon in non pvp area
and add to not able to summon in non pvp area
spells.cpp:1284:107: error: expected initializer before 'if'
spells.cpp:1290:1: error: expected unqualified-id before '{' token
make[1]: ** [spells.o] Erro 1
bool InstantSpell::SummonMonster(const InstantSpell* spell, Creature* creature, const std::string& param) if(player->getZone() == ZONE_OPTIONAL)
{
player->sendCancel("You cannot summon creatures in nopvp zones.");
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
return false;
}
before:
[cpp] ReturnValue ret = g_game.placeSummon(creature, param);[/cpp]
[COLOR=#ff0000]if(player->getZone() == ZONE_OPTIONAL)
{
player->sendCancel("You cannot summon creatures in nopvp zones.");
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
return false;
}[/COLOR]
ReturnValue ret = g_game.placeSummon(creature, param);
if(ret == RET_NOERROR)
{
[COLOR=#ff0000] const std::list<Creature*>& summons = player->getSummons();
for(std::list<Creature*>::const_iterator it = summons.begin(); it != summons.end(); ++it)
(*it)->setSkull(SKULL_BLACK);[/COLOR]
spell->postSpell(player, (uint32_t)manaCost, (uint32_t)spell->getSoulCost());
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_WRAPS_BLUE);
return true;
}
spells.cpp: In static member function 'static bool InstantSpell::SummonMonster(const InstantSpell*, Creature*, const std::string&)':
spells.cpp:1285:6: error: 'player' was not declared in this scope
spells.cpp:1296:47: error: 'player' was not declared in this scope
spells.cpp:1300:44: error: 'manaCost' was not declared in this scope
spells.cpp:1348:14: error: redeclaration of 'ReturnValue ret'
spells.cpp:1293:17: error: 'ReturnValue ret' previously declared here
make[1]: ** [spells.o] Erro 1