Please someone know how to do this?
When a player have a summon the monster automatic attack the summon, not the player.
And when the player has no summons, monster attack the player.
Please please please
I tried but no works XDD
Thanks.
When a player have a summon the monster automatic attack the summon, not the player.
And when the player has no summons, monster attack the player.
Please please please
I tried but no works XDD
Code:
bool Monster::selectTarget(Creature* creature)
{
#ifdef __DEBUG__
std::cout << "Selecting target... " << std::endl;
#endif
if(!isTarget(creature))
return false;
CreatureList::iterator it = std::find(targetList.begin(), targetList.end(), creature);
if(it == targetList.end())
{
//Target not found in our target list.
#ifdef __DEBUG__
std::cout << "Target not found in targetList." << std::endl;
#endif
return false;
}
Player* player = creature->getPlayer();
if (player && !player->getSummonCount() != 0)
return false;
if((isHostile() || isSummon()) && setAttackedCreature(creature) && !isSummon())
Dispatcher::getInstance().addTask(createTask(
boost::bind(&Game::checkCreatureAttack, &g_game, getID())));
return setFollowCreature(creature, true);
}
Thanks.
Last edited: