ike3 / mangosbot

This is a modification of MaNGOS (Zero, One, R2, Trinity) server which brings a number of bots online and available for any player. Also allows you to use your account/guild characters as bots.
http://ike3.github.io/mangosbot-docs/
GNU General Public License v2.0
182 stars 77 forks source link

2 minor issues #74

Open DuB1986 opened 8 years ago

DuB1986 commented 8 years ago

1.Issue Bots still fall through ground if mobs, they are attacking, are on a higher position as the bots 2.Issue Disabled Ahbot by Ike, enabled Standard TrinityCore Ahbot No items are selled Here are the relevant configs: World.conf:

AuctionHouseBot.Seller.Enabled = 1
AuctionHouseBot.Buyer.Enabled = 1 

Ahbot.conf:

# Disable original AuctionHouseBot
#AuctionHouseBot.Seller.Enabled = 0
#AuctionHouseBot.Buyer.Enabled = 0
# Replace with the new AhBot
AhBot.Enabled = 0
# Should be used only if random bots are disabled
AhBot.GUID = 0

latest Ike repo 16.06.16 win10 64Bit virtual studio 2015 64 Boost 1.61 MySQL 5.6

Hope someone can help

conan513 commented 8 years ago

you need to enable original TC ahbot in the source too https://github.com/conan513/SingleCore_TC/commit/8e364f422e042063995c3bb164881638b8f6497e

DuB1986 commented 8 years ago

tthanks this solved the ahbot problem, any idea about the falling through ground?

ghost commented 8 years ago

Check out the way many of those issues were solved in https://github.com/TrinityCore/TrinityCore/pull/16736


edit: https://patch-diff.githubusercontent.com/raw/TrinityCore/TrinityCore/pull/16736.diff

diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index ccc599b..5d2952a 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2328,9 +2328,9 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float
         {
             // we have mapheight and vmapheight and must select more appropriate

-            // we are already under the surface or vmap height above map heigt
+            // vmap height above map height
             // or if the distance of the vmap height is less the land height distance
-            if (z < mapHeight || vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
+            if (vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
                 return vmapHeight;
             else
                 return mapHeight;                           // better use .map surface height

Please note: the line numbers in this file may not match the line numbers in your file.

DuB1986 commented 8 years ago

i see, it seems to be a generel problem, i just thought cause only playerbots like to fall through ground, it is a playerbot issue, never saw real Players nor creatures fall through ground

ghost commented 8 years ago

OK, I have not played much with bots, not enough to know if they fall through the map or not. The patch & PR I linked is meant to fix in-game NPC issues. If bots are supposed to be player characters, I suppose different rules apply to them. And even if the PR fixed a lot of known NPC issues, some TC NPCs still walk lower than the map surface, mostly because "recast doesn't find a proper path, so it just builds a shortcut between the 2 waypoints".

DuB1986 commented 8 years ago

then should applying the npc pathfinding to playerbot pathfinding fix it? maybe someone could enlighten us

ghost commented 8 years ago

Unless a playerbot is managed by the mangosbot source code as a Non-Player Character, I don't think it will make much difference. NPCbots might have an advantage from using the vmaps patch. Other than that, I can not confirm what actually happens in ike3's playerbot code.