Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11922] Add ASSERT helper function to print entry and guid info
Use this in first cases: GetAngle and in PathFinder::BuildPolyPath Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
- Loading branch information
1 parent
d6fe15f
commit dfa3d9a
Showing
6 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -883,6 +883,15 @@ bool Object::PrintIndexError(uint32 index, bool set) const | |
return false; | ||
} | ||
|
||
bool Object::PrintEntryError(char const* descr) const | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Schmoozerd
Author
Contributor
|
||
{ | ||
sLog.outError("Object Type %u, Entry %u (lowguid %u) with invalid call for %s", GetTypeId(), GetEntry(), GetObjectGuid().GetCounter(), descr); | ||
|
||
// always false for continue assert fail | ||
return false; | ||
} | ||
|
||
|
||
void Object::BuildUpdateDataForPlayer(Player* pl, UpdateDataMapType& update_players) | ||
{ | ||
UpdateDataMapType::iterator iter = update_players.find(pl); | ||
|
@@ -1190,7 +1199,7 @@ float WorldObject::GetAngle(const WorldObject* obj) const | |
if (!obj) | ||
return 0.0f; | ||
|
||
MANGOS_ASSERT(obj != this); | ||
MANGOS_ASSERT(obj != this || PrintEntryError("GetAngle (for self)")); | ||
|
||
return GetAngle(obj->GetPositionX(), obj->GetPositionY()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#ifndef __REVISION_NR_H__ | ||
#define __REVISION_NR_H__ | ||
#define REVISION_NR "11921" | ||
#define REVISION_NR "11922" | ||
#endif // __REVISION_NR_H__ |
"The procedure entry point blah blah blah" error when server starts, win32 building with VC90 project.