mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-19 14:11:06 +03:00
Compare commits
No commits in common. "6e1eb93ff9b65494ed09d30698c03a0bbbb1c967" and "184d3b041f73f21657c4077f4df3ed3253cb7222" have entirely different histories.
6e1eb93ff9
...
184d3b041f
@ -21,10 +21,9 @@
|
||||
#include "util/CStatus.hpp"
|
||||
#include <common/MD5.hpp>
|
||||
|
||||
WOWGUID CGGameUI::s_currentObjectTrack;
|
||||
CScriptObject* CGGameUI::s_gameTooltip;
|
||||
WOWGUID CGGameUI::s_lockedTarget;
|
||||
CSimpleTop* CGGameUI::s_simpleTop;
|
||||
WOWGUID CGGameUI::s_lockedTarget;
|
||||
|
||||
void LoadScriptFunctions() {
|
||||
// TODO
|
||||
@ -59,10 +58,6 @@ void LoadScriptFunctions() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
WOWGUID& CGGameUI::GetCurrentObjectTrack() {
|
||||
return CGGameUI::s_currentObjectTrack;
|
||||
}
|
||||
|
||||
WOWGUID& CGGameUI::GetLockedTarget() {
|
||||
return CGGameUI::s_lockedTarget;
|
||||
}
|
||||
@ -160,12 +155,6 @@ int32_t CGGameUI::IsRaidMember(const WOWGUID& guid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t CGGameUI::IsRaidMemberOrPet(const WOWGUID& guid) {
|
||||
// TODO
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CGGameUI::RegisterFrameFactories() {
|
||||
FrameXML_RegisterFactory("WorldFrame", &CGWorldFrame::Create, true);
|
||||
FrameXML_RegisterFactory("GameTooltip", &CGTooltip::Create, false);
|
||||
|
||||
@ -13,16 +13,13 @@ class CGGameUI {
|
||||
static CSimpleTop* s_simpleTop;
|
||||
|
||||
// Static functions
|
||||
static WOWGUID& GetCurrentObjectTrack();
|
||||
static WOWGUID& GetLockedTarget();
|
||||
static void Initialize();
|
||||
static void InitializeGame();
|
||||
static int32_t IsRaidMember(const WOWGUID& guid);
|
||||
static int32_t IsRaidMemberOrPet(const WOWGUID& guid);
|
||||
static void RegisterFrameFactories();
|
||||
|
||||
private:
|
||||
static WOWGUID s_currentObjectTrack;
|
||||
static WOWGUID s_lockedTarget;
|
||||
};
|
||||
|
||||
|
||||
@ -3,20 +3,6 @@
|
||||
#include "ui/game/CGGameUI.hpp"
|
||||
#include <storm/String.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
bool ParseTrailingTokens(const char* token, WOWGUID& guid, CGPlayer_C* player) {
|
||||
// TODO
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool Script_GetGUIDFromString(const char*& token, WOWGUID& guid) {
|
||||
// TODO
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Script_GetGUIDFromToken(const char* token, WOWGUID& guid, bool defaultToTarget) {
|
||||
auto activePlayer = static_cast<CGPlayer_C*>(ClntObjMgrObjectPtr(ClntObjMgrGetActivePlayer(), TYPE_PLAYER, __FILE__, __LINE__));
|
||||
|
||||
@ -132,11 +118,7 @@ bool Script_GetGUIDFromToken(const char* token, WOWGUID& guid, bool defaultToTar
|
||||
else if (!SStrCmpI(parseToken, "mouseover", 9)) {
|
||||
parseToken += 9;
|
||||
|
||||
auto trackedObjectGuid = CGGameUI::GetCurrentObjectTrack();
|
||||
|
||||
if (ClntObjMgrObjectPtr(trackedObjectGuid, TYPE_UNIT, __FILE__, __LINE__) || CGGameUI::IsRaidMemberOrPet(trackedObjectGuid)) {
|
||||
guid = trackedObjectGuid;
|
||||
}
|
||||
// TODO
|
||||
}
|
||||
|
||||
// focus - focus target
|
||||
@ -167,25 +149,9 @@ bool Script_GetGUIDFromToken(const char* token, WOWGUID& guid, bool defaultToTar
|
||||
guid = -1;
|
||||
}
|
||||
|
||||
// Token string was fully parsed or GUID was determined and token string potentially includes
|
||||
// trailing tokens
|
||||
if ((*parseToken == '\0' || guid) && ParseTrailingTokens(parseToken, guid, activePlayer)) {
|
||||
if (!guid) {
|
||||
guid = -2;
|
||||
}
|
||||
// TODO ParseTrailingTokens
|
||||
// TODO Script_GetGUIDFromString
|
||||
// TODO guid -2
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token string was either not parsed or only partially parsed and GUID was not determined
|
||||
if (!guid && Script_GetGUIDFromString(token, guid) && ParseTrailingTokens(token, guid, activePlayer)) {
|
||||
if (!guid) {
|
||||
guid = -2;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// GUID was not successfully determined
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
|
||||
#include "util/GUID.hpp"
|
||||
|
||||
bool Script_GetGUIDFromString(const char*& token, WOWGUID& guid);
|
||||
|
||||
bool Script_GetGUIDFromToken(const char* token, WOWGUID& guid, bool defaultToTarget);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user