mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
refactor(Scripts/Commands): convert cs_misc to new system (#8939)
This commit is contained in:
committed by
GitHub
parent
7617ae4645
commit
838c88f45a
@@ -298,7 +298,7 @@ size_t ChatHandler::BuildChatPacket(WorldPacket& data, ChatMsg chatType, Languag
|
||||
return BuildChatPacket(data, chatType, language, senderGUID, receiverGUID, message, chatTag, senderName, receiverName, achievementId, gmMessage, channelName);
|
||||
}
|
||||
|
||||
Player* ChatHandler::getSelectedPlayer()
|
||||
Player* ChatHandler::getSelectedPlayer() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
@@ -310,7 +310,7 @@ Player* ChatHandler::getSelectedPlayer()
|
||||
return ObjectAccessor::FindConnectedPlayer(selected);
|
||||
}
|
||||
|
||||
Unit* ChatHandler::getSelectedUnit()
|
||||
Unit* ChatHandler::getSelectedUnit() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
@@ -321,7 +321,7 @@ Unit* ChatHandler::getSelectedUnit()
|
||||
return m_session->GetPlayer();
|
||||
}
|
||||
|
||||
WorldObject* ChatHandler::getSelectedObject()
|
||||
WorldObject* ChatHandler::getSelectedObject() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
@@ -334,7 +334,7 @@ WorldObject* ChatHandler::getSelectedObject()
|
||||
return ObjectAccessor::GetUnit(*m_session->GetPlayer(), guid);
|
||||
}
|
||||
|
||||
Creature* ChatHandler::getSelectedCreature()
|
||||
Creature* ChatHandler::getSelectedCreature() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
@@ -342,7 +342,7 @@ Creature* ChatHandler::getSelectedCreature()
|
||||
return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetTarget());
|
||||
}
|
||||
|
||||
Player* ChatHandler::getSelectedPlayerOrSelf()
|
||||
Player* ChatHandler::getSelectedPlayerOrSelf() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
@@ -472,7 +472,7 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GameObject* ChatHandler::GetNearbyGameObject()
|
||||
GameObject* ChatHandler::GetNearbyGameObject() const
|
||||
{
|
||||
if (!m_session)
|
||||
return nullptr;
|
||||
|
||||
@@ -90,12 +90,12 @@ public:
|
||||
bool HasLowerSecurityAccount(WorldSession* target, uint32 account, bool strong = false);
|
||||
|
||||
void SendGlobalGMSysMessage(const char* str);
|
||||
Player* getSelectedPlayer();
|
||||
Creature* getSelectedCreature();
|
||||
Unit* getSelectedUnit();
|
||||
WorldObject* getSelectedObject();
|
||||
Player* getSelectedPlayer() const;
|
||||
Creature* getSelectedCreature() const;
|
||||
Unit* getSelectedUnit() const;
|
||||
WorldObject* getSelectedObject() const;
|
||||
// Returns either the selected player or self if there is no selected player
|
||||
Player* getSelectedPlayerOrSelf();
|
||||
Player* getSelectedPlayerOrSelf() const;
|
||||
|
||||
char* extractKeyFromLink(char* text, char const* linkType, char** something1 = nullptr);
|
||||
char* extractKeyFromLink(char* text, char const* const* linkTypes, int* found_idx, char** something1 = nullptr);
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:" + name + "|h[" + name + "]|h|r" : name; }
|
||||
std::string GetNameLink(Player* chr) const;
|
||||
|
||||
GameObject* GetNearbyGameObject();
|
||||
GameObject* GetNearbyGameObject() const;
|
||||
GameObject* GetObjectFromPlayerMapByDbGuid(ObjectGuid::LowType lowguid);
|
||||
Creature* GetCreatureFromPlayerMapByDbGuid(ObjectGuid::LowType lowguid);
|
||||
bool HasSentErrorMessage() const { return sentErrorMessage; }
|
||||
|
||||
@@ -38,7 +38,6 @@ struct TalentEntry;
|
||||
|
||||
namespace Acore::Hyperlinks
|
||||
{
|
||||
|
||||
struct AchievementLinkData
|
||||
{
|
||||
AchievementEntry const* Achievement;
|
||||
@@ -90,7 +89,8 @@ namespace Acore::Hyperlinks
|
||||
std::string KnownRecipes;
|
||||
};
|
||||
|
||||
namespace LinkTags {
|
||||
namespace LinkTags
|
||||
{
|
||||
|
||||
/************************** LINK TAGS ***************************************************\
|
||||
|* Link tags must abide by the following: *|
|
||||
@@ -247,9 +247,9 @@ namespace Acore::Hyperlinks
|
||||
std::string_view const data;
|
||||
std::string_view const text;
|
||||
};
|
||||
|
||||
HyperlinkInfo AC_GAME_API ParseSingleHyperlink(std::string_view str);
|
||||
bool AC_GAME_API CheckAllLinks(std::string_view str);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user