Jump to content

Added Config option for Pet.Los now you can Handle.


NoHad
 Share

Recommended Posts

Added Config option for Pet.Los now you can Handle. Now you can set if you want to get working attack command of pet throught texture or no.. it works as if your's target is behind the texture and you've setted 0 pet will not go attack if you click on attack ( it's default on mangos ) and if you set 1 he will go attack

diff -r 428e6a81b03d0786a1201d374a9208604e06e84c -r 8c5d352b91e4b6ac54666eea1b9f9220f6e5bb75 src/game/PetHandler.cpp

--- a/src/game/PetHandler.cpp Tue Jan 10 10:57:59 2012 +0100

+++ b/src/game/PetHandler.cpp Tue Jan 10 11:07:15 2012 +0100

@@ -105,8 +105,13 @@

if(GetPlayer()->IsFriendlyTo(TargetUnit))

return;

// Not let attack through obstructions

- if(!pet->IsWithinLOSInMap(TargetUnit))

- return;

+ if(sWorld.getConfig(CONFIG_BOOL_PET_LOS))

+ {

+

+ if(!pet->IsWithinLOSInMap(TargetUnit))

+ return;

+

+ }

// This is true if pet has no target or has target but targets differs.

if(pet->getVictim() != TargetUnit)

diff -r 428e6a81b03d0786a1201d374a9208604e06e84c -r 8c5d352b91e4b6ac54666eea1b9f9220f6e5bb75 src/game/World.cpp

--- a/src/game/World.cpp Tue Jan 10 10:57:59 2012 +0100

+++ b/src/game/World.cpp Tue Jan 10 11:07:15 2012 +0100

@@ -839,6 +839,7 @@

bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false);

bool enableHeight = sConfig.GetBoolDefault("vmap.enableHeight", false);

std::string ignoreSpellIds = sConfig.GetStringDefault("vmap.ignoreSpellIds", "");

+ setConfig(CONFIG_BOOL_PET_LOS, "vmap.PetLos", false);

if (!enableHeight)

sLog.outError("VMAP height use disabled! Creatures movements and other things will be in broken state.");

diff -r 428e6a81b03d0786a1201d374a9208604e06e84c -r 8c5d352b91e4b6ac54666eea1b9f9220f6e5bb75 src/game/World.h

--- a/src/game/World.h Tue Jan 10 10:57:59 2012 +0100

+++ b/src/game/World.h Tue Jan 10 11:07:15 2012 +0100

@@ -326,6 +326,7 @@

CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT,

CONFIG_BOOL_CLEAN_CHARACTER_DB,

CONFIG_BOOL_VMAP_INDOOR_CHECK,

+ CONFIG_BOOL_PET_LOS,

CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT,

CONFIG_BOOL_PVP_TOKEN_ENABLE,

CONFIG_BOOL_BG_ROTATE,

diff -r 428e6a81b03d0786a1201d374a9208604e06e84c -r 8c5d352b91e4b6ac54666eea1b9f9220f6e5bb75 src/mangosd/mangosd.conf.dist.in

--- a/src/mangosd/mangosd.conf.dist.in Tue Jan 10 10:57:59 2012 +0100

+++ b/src/mangosd/mangosd.conf.dist.in Tue Jan 10 11:07:15 2012 +0100

@@ -153,7 +153,12 @@

# Requires VMaps enabled to work.

# Default: 1 (Enabled)

# 0 (Disabled)

-#

+#

+# vmap.PetLos

+# Check LOS for pets, to avoid them going through walls etc.

+# Default: 0 (disable, less CPU usage)

+# 1 (enable, each pet attack command will check for LOS)

+#

#

# DetectPosCollision

# Check final move position, summon position, etc for visible collision with other objects or

@@ -215,6 +220,7 @@

vmap.enableHeight = 1

vmap.ignoreSpellIds = "7720,32375"

vmap.enableIndoorCheck = 1

+vmap.PetLos = 0

DetectPosCollision = 1

TargetPosRecalculateRange = 1.5

Enjoy :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use