本文件包含所有重大 API 变更的更新日志。
PrepareStatment- setNull(...)
+ SetData(...)
- setBool(...)
+ SetData(...)
- setUInt8(...)
+ SetData(...)
- setInt8(...)
+ SetData(...)
- setUInt16(...)
+ SetData(...)
- setInt16(...)
+ SetData(...)
- setUInt32(...)
+ SetData(...)
- setUInt64(...)
+ SetData(...)
- setInt64(...)
+ SetData(...)
- setFloat(...)
+ SetData(...)
- setDouble(...)
+ SetData(...)
- setString(...)
+ SetData(...)
- setStringView(...)
+ SetData(...)
- setBinary(...)
+ SetData(...)
Fields- GetBool()
+ Get<bool>()
- GetUInt8()
+ Get<uint8>()
- GetInt8()
+ Get<int8>()
- GetUInt16()
+ Get<uint16>()
- GetInt16()
+ Get<int16>()
- GetUInt32()
+ Get<uint32>()
- GetInt32()
+ Get<int32>()
- GetUInt64()
+ Get<uint64>()
- GetInt64()
+ Get<int64>()
- GetFloat()
+ Get<float>()
- GetDouble()
+ Get<double>()
- GetString()
+ Get<std::string>()
- GetStringView()
+ Get<std::string_view>()
- GetBinary()
+ Get<Binary>()
- time(nullptr)
+ GameTime::GetGameTime().count()
- sWorld->GetGameTime()
+ GameTime::GetGameTime().count()
- World::GetGameTimeMS()
+ GameTime::GetGameTimeMS().count()
我们建议你始终使用我们 master 分支的最新版本。 https://github.com/azerothcore/azerothcore-wotlk/tree/master
对于服务器管理员:关于如何升级现有服务器的说明可参见此处。
此 PR 从 creature 表中移除了 modelId 列,以便我们迁移到双 entry 刷新系统。
如果这对游戏内或自定义刷新造成问题,可以使用以下 SAI 语句来更新 modelId。
(#entryorguid,0,0,0,11,0,100,0,0,0,0,0,0,3,0,#modelId,0,0,0,0,1,0,0,0,0,0,0,0,0,"Creature Name - On Spawn - Change Model to #modelId"),
特别感谢 @Shin @Kitzunu @M'Dic 的协助。
// Unit.cpp
virtual void Talk(std::string_view text, ChatMsg msgType, Language language, float textRange, WorldObject const* target);
virtual void Say(std::string_view text, Language language, WorldObject const* target = nullptr);
virtual void Yell(std::string_view text, Language language, WorldObject const* target = nullptr);
virtual void TextEmote(std::string_view text, WorldObject const* target = nullptr, bool isBossEmote = false);
virtual void Whisper(std::string_view text, Language language, Player* target, bool isBossWhisper = false);
virtual void Talk(uint32 textId, ChatMsg msgType, float textRange, WorldObject const* target);
virtual void Say(uint32 textId, WorldObject const* target = nullptr);
virtual void Yell(uint32 textId, WorldObject const* target = nullptr);
virtual void TextEmote(uint32 textId, WorldObject const* target = nullptr, bool isBossEmote = false);
virtual void Whisper(uint32 textId, Player* target, bool isBossWhisper = false);
// Object.cpp
void MonsterSay(const char* text, uint32 language, WorldObject const* target);
void MonsterYell(const char* text, uint32 language, WorldObject const* target);
void MonsterTextEmote(const char* text, WorldObject const* target, bool IsBossEmote = false);
void MonsterWhisper(const char* text, Player const* target, bool IsBossWhisper = false);
void MonsterSay(int32 textId, uint32 language, WorldObject const* target);
void MonsterYell(int32 textId, uint32 language, WorldObject const* target);
void MonsterTextEmote(int32 textId, WorldObject const* target, bool IsBossEmote = false);
void MonsterWhisper(int32 textId, Player const* target, bool IsBossWhisper = false);
void SendPlaySound(uint32 Sound, bool OnlySelf);
- creature->MonsterSay(text, LANG_XXX, nullptr);
+ creature->Say(text, LANG_XXX);
- creature->MonsterTextEmote(text, 0);
+ creature->TextEmote(text);
- creature->MonsterWhisper(text, receiver);
+ creature->Whisper(text, LANG_XXX, receiver);
- creature->MonsterYell(text, LANG_XXX, NULL);
+ creature->Yell(text, LANG_XXX);
- creature->MonsterWhisper(text, target, isBossWhisper);
+ creature->Whisper(text, LANG_XXX, target, isBossWhisper);
- SendPlaySound(uint32 Sound, bool OnlySelf);
PlayDirectSound(uint32 sound_id, Player* target = nullptr);
OnPlayerPVPFlagChange 钩子,它会在玩家的 PVP 标记发生改变后被触发。OnBeforeFinalizePlayerWorldSession ,可用于通过模块修改发送给客户端的缓存版本。将你的 Boost 版本升级到 1.74 或更高。
提交 "feature(Core/Spells): Allow to learn all spells for characters on creation" 的更新日志
- uint32 id; // 0 m_ID
- uint32 skillId; // 1 m_skillLine
- uint32 spellId; // 2 m_spell
- uint32 racemask; // 3 m_raceMask
- uint32 classmask; // 4 m_classMask
- //uint32 racemaskNot; // 5 m_excludeRace
- //uint32 classmaskNot; // 6 m_excludeClass
- uint32 req_skill_value; // 7 m_minSkillLineRank
- uint32 forward_spellid; // 8 m_supercededBySpell
- uint32 learnOnGetSkill; // 9 m_acquireMethod
- uint32 max_value; // 10 m_trivialSkillLineRankHigh
- uint32 min_value; // 11 m_trivialSkillLineRankLow
- //uint32 characterPoints[2]; // 12-13 m_characterPoints[2]
+ uint32 ID; // 0
+ uint32 SkillLine; // 1
+ uint32 Spell; // 2
+ uint32 RaceMask; // 3
+ uint32 ClassMask; // 4
+ //uint32 ExcludeRace; // 5
+ //uint32 ExcludeClass; // 6
+ uint32 MinSkillLineRank; // 7
+ uint32 SupercededBySpell; // 8
+ uint32 AcquireMethod; // 9
+ uint32 TrivialSkillLineRankHigh; // 10
+ uint32 TrivialSkillLineRankLow; // 11
+ //uint32 CharacterPoints[2]; // 12-13
player->ADD_GOSSIP_ITEM(whatever) -> AddGossipItemFor(player, whatever)
player->ADD_GOSSIP_ITEM_DB(whatever) -> AddGossipItemFor(player, whatever)
player->ADD_GOSSIP_ITEM_EXTENDED(whatever) -> AddGossipItemFor(player, whatever)
player->CLOSE_GOSSIP_MENU() -> CloseGossipMenuFor(player)
player->SEND_GOSSIP_MENU(textid, creature->GetGUID()) -> SendGossipMenuFor(player, textid, creature->GetGUID())
你还需要在你的 cpp 文件中包含 #include "ScriptedGossip.h"
static dynamic minimal-static minimal-dynamic #5346
static - 静态构建。默认选项。适用于所有脚本(和之前一样)
dynamic - 动态构建。后续将支持动态链接库(DLL),可为每个脚本生成独立的库。目前不支持
minimal-static - 静态构建命令和技能
minimal-dynamic - 动态构建命令和技能。目前不支持
SCRIPTS 变量提供的默认值可以通过 SCRIPTS_COMMANDS, SCRIPTS_SPELLS... 变量覆盖。> Module (mod-ah-bot) using deprecated loader api
1. 将文件中的扩展名改为 `.cpp`
2. 将通用加载函数重命名为 `Add(模块名(将所有空白字符替换为 '_')Scripts()`。
3. 从 `CMakeLists.txt` 中删除宏 `AC_ADD_SCRIPT_LOADER`
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
*/
// From SC
void AddSC_ServerAutoShutdown();
// Add all scripts
void Addmod_server_auto_shutdownScripts()
{
AddSC_ServerAutoShutdown();
}
WITH_STRICT_DATABASE_TYPE_CHECKS #5611
PreparedStatement- PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGONPROOF);
+ LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGONPROOF);
SQLTransaction- SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
OnBeforeSendJoinMessageArenaQueue 和 OnBeforeSendExitMessageArenaQueue
CanExitJoinMessageArenaQueue 重命名为 OnBeforeSendExitMessageArenaQueue
CanSendJoinMessageArenaQueue 重命名为 OnBeforeSendJoinMessageArenaQueue
CanExitJoinMessageArenaQueue 和 CanSendMessageArenaQueue 钩子重命名为 OnBeforeSendExitMessageArenaQueue
CanSendJoinMessageArenaQueue 钩子重命名为 OnBeforeSendJoinMessageArenaQueue
提交 "refactor(Collision): Update some methods to UpperCamelCase" 的更新日志
- getPosition
- getBounds
- getBounds2
- getInstanceMapTree
- getModelInstances
- getPosInfo
- getMeshData
- getGroupModels
- getIntersectionTime
- getObjectHitPos
- getAreaInfo
+ GetPosition
+ GetBounds
+ GetBounds2
+ GetInstanceMapTree
+ GetModelInstances
+ GetPosInfo
+ GetMeshData
+ GetGroupModels
+ GetIntersectionTime
+ GetObjectHitPos
+ GetAreaInfo
如果你使用了这些方法中的任何一个,只需将方法名的首字母从小写改为大写即可。
示例:getAreaInfo -> GetAreaInfo