- attached PlayerbotAI.cpp
[Solved] Codstyle Changes
Been having issues with Npcbots since commit 013fb1f4d9131fc8ec45931445e6a05408dce8f9 Core/Misc: reduced amount of string memory allocations (Step I)
They added a lot of .c_str() Memory Allocations. I managed to Merge and compile still, but now npcbots when summoned appear as friendly npc in party (Green) and then worldserver.exe crashes.
After restart, bots are still in party, and act correctly. If new bots are summoned, same result.
Could just be my merge, but I'm thinking with all the String changes, the problem is probably there.
I added in the strings to PlayerbotAI.cpp pretty easily because compile errors referencing changes in Group.cpp and other called strings are easily tracked, but it's proven much harder in Npcbots because they still compile without errors.
Comments (9)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
reporter - attached botgiver.cpp
- attached botcommands.cpp
- attached bot_ai.cpp
Haven't tested thoroughly, but this should fix the issue
-
repo owner I gonna update and take a look. One question: did you add bots through command or through bot giver?
-
repo owner - changed status to open
took in consideration
-
reporter For NpcBots both command .npcbot add (class) and Botgiver. I've had a chance to test npcbots. They seem to be working as intended with the new scripts.
I have not tried Playerbots. I have them disabled on my server, so I just edited enough for them to compile. There are still several memory allocations that are using the old GetName() instead of GetName().c_str()
-
repo owner -
reporter Very nice. Worked good for me on both Master and MMaps branches.
-
reporter - changed status to resolved
- Log in to comment
I attached my modified PlayerbotAI.cpp - Hopefully that helps a little.