mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 18:46:37 +00:00
Merge fixes, hopefully didn't break anything.
This commit is contained in:
+18
-19
@@ -16,7 +16,8 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/debug.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/faction.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/spdat.h"
|
||||
@@ -342,22 +343,18 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
{
|
||||
//FatherNiwtit: make sure we can see them. last since it is very expensive
|
||||
if(CheckLosFN(mob)) {
|
||||
|
||||
// Aggro
|
||||
#if EQDEBUG>=6
|
||||
LogFile->write(EQEmuLog::Debug, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
#endif
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
return( mod_will_aggro(mob, this) );
|
||||
}
|
||||
}
|
||||
#if EQDEBUG >= 6
|
||||
printf("Is In zone?:%d\n", mob->InZone());
|
||||
printf("Dist^2: %f\n", dist2);
|
||||
printf("Range^2: %f\n", iAggroRange2);
|
||||
printf("Faction: %d\n", fv);
|
||||
printf("Int: %d\n", GetINT());
|
||||
printf("Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
#endif
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Is In zone?:%d\n", mob->InZone());
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Dist^2: %f\n", dist2);
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Range^2: %f\n", iAggroRange2);
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Faction: %d\n", fv);
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Int: %d\n", GetINT());
|
||||
Log.Out(Logs::Detail, Logs::Aggro, "Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -470,8 +467,10 @@ void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) {
|
||||
//Father Nitwit: make sure we can see them.
|
||||
if(mob->CheckLosFN(sender)) {
|
||||
#if (EQDEBUG>=5)
|
||||
LogFile->write(EQEmuLog::Debug, "AIYellForHelp(\"%s\",\"%s\") %s attacking %s Dist %f Z %f",
|
||||
sender->GetName(), attacker->GetName(), mob->GetName(), attacker->GetName(), DistanceSquared(mob->GetPosition(), sender->GetPosition()), fabs(sender->GetZ()+mob->GetZ()));
|
||||
Log.Out(Logs::General, Logs::None, "AIYellForHelp(\"%s\",\"%s\") %s attacking %s Dist %f Z %f",
|
||||
sender->GetName(), attacker->GetName(), mob->GetName(),
|
||||
attacker->GetName(), DistanceSquared(mob->GetPosition(),
|
||||
sender->GetPosition()), fabs(sender->GetZ()+mob->GetZ()));
|
||||
#endif
|
||||
mob->AddToHateList(attacker, 1, 0, false);
|
||||
}
|
||||
@@ -697,7 +696,7 @@ type', in which case, the answer is yes.
|
||||
}
|
||||
while( reverse++ == 0 );
|
||||
|
||||
LogFile->write(EQEmuLog::Debug, "Mob::IsAttackAllowed: don't have a rule for this - %s vs %s\n", this->GetName(), target->GetName());
|
||||
Log.Out(Logs::General, Logs::None, "Mob::IsAttackAllowed: don't have a rule for this - %s vs %s\n", this->GetName(), target->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -837,7 +836,7 @@ bool Mob::IsBeneficialAllowed(Mob *target)
|
||||
}
|
||||
while( reverse++ == 0 );
|
||||
|
||||
LogFile->write(EQEmuLog::Debug, "Mob::IsBeneficialAllowed: don't have a rule for this - %s to %s\n", this->GetName(), target->GetName());
|
||||
Log.Out(Logs::General, Logs::None, "Mob::IsBeneficialAllowed: don't have a rule for this - %s to %s\n", this->GetName(), target->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -949,7 +948,7 @@ bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) {
|
||||
oloc.z = posZ + (mobSize==0.0?LOS_DEFAULT_HEIGHT:mobSize)/2 * SEE_POSITION;
|
||||
|
||||
#if LOSDEBUG>=5
|
||||
LogFile->write(EQEmuLog::Debug, "LOS from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f) sizes: (%.2f, %.2f)", myloc.x, myloc.y, myloc.z, oloc.x, oloc.y, oloc.z, GetSize(), mobSize);
|
||||
Log.Out(Logs::General, Logs::None, "LOS from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f) sizes: (%.2f, %.2f)", myloc.x, myloc.y, myloc.z, oloc.x, oloc.y, oloc.z, GetSize(), mobSize);
|
||||
#endif
|
||||
return zone->zonemap->CheckLoS(myloc, oloc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user