List of changes to Trinity's "Application Programming Interface"*
- TalkToMap(text); + Talk(text); |
Table `creature_text`: new column `TextRange` defines the range of the text: 0 - default, 1 - area, 2 - zone, 3 - map, 4 - world
- uint64 guid; + ObjectGuid guid; |
- std::set<uint64> guids; + GuidSet guids; - std::list<uint64> guids; + GuidList guids; |
- guid = 0; + guid.Clear(); // Initialization (0) is no longer necessary |
- someFunctionAcceptingGuidArgument(0); + someFunctionAcceptingGuidArgument(ObjectGuid::Empty); |
- TC_LOG_XXX("somewhere", "... " UI64FMTD "...", playerGuid); // ... 100 ... + TC_LOG_XXX("somewhere", "... %s ...", playerGuid.ToString().c_str()); // ... GUID Full: 0x0000000000000064 Type: Player Low: 100 ... |
- data->append(ptr->GetPackGUID()); + *data << ptr->GetPackGuid(); |
- uint64 guid = MAKE_NEW_GUID(low, entry, HIGHGUID_TYPE); + ObjectGuid guid(HIGHGUID_TYPE, entry, low); - uint64 guid = MAKE_NEW_GUID(low, 0, HIGHGUID_TYPE); + ObjectGuid guid(HIGHGUID_TYPE, low); |
- GUID_LOPART(guid); + guid.GetCounter(); - GUID_ENPART(guid); + guid.GetEntry(); - GUID_HIPART(guid); + guid.GetHigh(); |
- instance->SetData64(field, guid); + instance->SetGuidData(field, guid); // Set/GetData64 still exists and should not be used with guids |
- player->GetUInt64Value(field); + player->GetGuidValue(field); |
- creature->MonsterSay(text, LANG_XXX, NULL); + 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); |
- DoPlaySound(obj, SOUND_XXX); + obj->PlayDirectSound(SOUND_XXX); |
- go->MonsterWhisper(text, player); + WorldPacket packet; + ChatHandler::BuildChatPacket(packet, CHAT_MSG_MONSTER_WHISPER, LANG_UNIVERSAL, go, player, text); + player->SendDirectMessage(&packet); |
Table `waypoint_scripts`
: TALK (`command`
=0) now requires an id (`dataint`
) from the table `broadcast_text`
.
* TC does not actually have a well defined API. In this page we gather changes to classes/methods and other artifacts commonly used in scripts. |