Apparently you didn't read the question.Code:if isMonster(target) then return true end
Apparently you didn't. Let me break it down for you because yet again you prove to be slow.Apparently you didn't read the question.
how i can do that monsters don't hit eachother with like area attacks from them ?
if isMonster(target) then
return true
end
Well as you can see in my avatar I like kittens you must like strapping young menYou truly have no understanding of the English language do you?
heellloo, its a simple question not even worth to make a topic but yeh, xd
how i can do that monsters don't hit eachother with like area attacks from them ?
kind regards,
No I like the hard work and dedication I've put towards the physique I've obtained in order to be healthy and fit.Well as you can see in my avatar I like kittens you must like strapping young men![]()
bool Game::combatChangeHealth(CombatType_t combatType, MagicEffectClasses customHitEffect, TextColor_t customTextColor, Creature* attacker, Creature* target, int32_t healthChange)
const Position& targetPos = target->getPosition();
const SpectatorVec& list = getSpectators(targetPos);
Player* targetPlayer = target->getPlayer();
Player* attackerPlayer;
if (attacker) {
attackerPlayer = attacker->getPlayer();
} else {
attackerPlayer = nullptr;
}
if(!attackerPlayer && !targetPlayer) {
return false;
}
@Yaze
Here it is man
In game.cpp, find the function
Code:bool Game::combatChangeHealth(CombatType_t combatType, MagicEffectClasses customHitEffect, TextColor_t customTextColor, Creature* attacker, Creature* target, int32_t healthChange)
Below that lines:
Code:const Position& targetPos = target->getPosition(); const SpectatorVec& list = getSpectators(targetPos);
Add this:
Code:Player* targetPlayer = target->getPlayer(); Player* attackerPlayer; if (attacker) { attackerPlayer = attacker->getPlayer(); } else { attackerPlayer = nullptr; } if(!attackerPlayer && !targetPlayer) { return false; }
Enjoy it![]()
bool Game::combatChangeHealth(CombatType_t combatType, MagicEffectClasses customHitEffect, TextColor_t customTextColor, Creature* attacker, Creature* target, int32_t healthChange)
const Position& targetPos = target->getPosition();
const SpectatorVec& list = getSpectators(targetPos);
Player* targetPlayer = target->getPlayer();
Player* attackerPlayer;
if (attacker) {
attackerPlayer = attacker->getPlayer();
} else {
attackerPlayer = nullptr;
}
if(!attackerPlayer && !targetPlayer) {
return false;
}
const Position& targetPos = target->getPosition();
const SpectatorVec& list = getSpectators(targetPos);
Player* targetPlayer = target->getPlayer();
Player* attackerPlayer;
if (attacker) {
attackerPlayer = attacker->getPlayer();
} else {
attackerPlayer = nullptr;
}
if(!attackerPlayer && !targetPlayer) {
return false;
}