Merge branch 'master' into 303

Conflicts:
	src/game/ObjectMgr.cpp
This commit is contained in:
tomrus88 2008-11-22 17:23:44 +03:00
commit 6224f95fd5
15 changed files with 167 additions and 93 deletions

16
contrib/vmap_assembler/.gitignore vendored Normal file
View file

@ -0,0 +1,16 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.ncb
*.suo
Release
Debug

13
contrib/vmap_assembler/VC71/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

13
contrib/vmap_assembler/VC80/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

13
contrib/vmap_assembler/VC90/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

View file

@ -27,7 +27,7 @@ namespace MaNGOS
{ {
inline uint32 hk_honor_at_level(uint32 level, uint32 count=1) inline uint32 hk_honor_at_level(uint32 level, uint32 count=1)
{ {
return ceil(count*(-0.53177f + 0.59357f * exp((level +23.54042f) / 26.07859f ))); return (uint32)ceil(count*(-0.53177f + 0.59357f * exp((level +23.54042f) / 26.07859f )));
} }
} }
namespace XP namespace XP

View file

@ -64,8 +64,6 @@ void WorldSession::HandleGMTicketUpdateTextOpcode( WorldPacket & recv_data )
std::string ticketText; std::string ticketText;
recv_data >> ticketText; recv_data >> ticketText;
CharacterDatabase.escape_string(ticketText);
if(GMTicket* ticket = ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow())) if(GMTicket* ticket = ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow()))
ticket->SetText(ticketText.c_str()); ticket->SetText(ticketText.c_str());
else else
@ -103,8 +101,6 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
sLog.outDebug("TicketCreate: map %u, x %f, y %f, z %f, text %s, unk1 %u, unk2 %u", map, x, y, z, ticketText.c_str(), unk1, unk2); sLog.outDebug("TicketCreate: map %u, x %f, y %f, z %f, text %s, unk1 %u, unk2 %u", map, x, y, z, ticketText.c_str(), unk1, unk2);
CharacterDatabase.escape_string(ticketText);
if(ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow())) if(ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow()))
{ {
WorldPacket data( SMSG_GMTICKET_CREATE, 4 ); WorldPacket data( SMSG_GMTICKET_CREATE, 4 );

View file

@ -50,7 +50,10 @@ class GMTicket
{ {
m_text = text ? text : ""; m_text = text ? text : "";
m_lastUpdate = time(NULL); m_lastUpdate = time(NULL);
CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", m_text.c_str(), m_guid);
std::string escapedString = m_text;
CharacterDatabase.escape_string(escapedString);
CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", escapedString.c_str(), m_guid);
} }
void DeleteFromDB() const void DeleteFromDB() const
@ -62,7 +65,11 @@ class GMTicket
{ {
CharacterDatabase.BeginTransaction(); CharacterDatabase.BeginTransaction();
DeleteFromDB(); DeleteFromDB();
CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, GetText());
std::string escapedString = m_text;
CharacterDatabase.escape_string(escapedString);
CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, escapedString.c_str());
CharacterDatabase.CommitTransaction(); CharacterDatabase.CommitTransaction();
} }
private: private:
@ -115,4 +122,4 @@ class GMTicketMgr
}; };
#define ticketmgr MaNGOS::Singleton<GMTicketMgr>::Instance() #define ticketmgr MaNGOS::Singleton<GMTicketMgr>::Instance()
#endif #endif

View file

@ -42,6 +42,7 @@
#include "InstanceSaveMgr.h" #include "InstanceSaveMgr.h"
#include "SpellAuras.h" #include "SpellAuras.h"
#include "Util.h" #include "Util.h"
#include "WaypointManager.h"
INSTANTIATE_SINGLETON_1(ObjectMgr); INSTANTIATE_SINGLETON_1(ObjectMgr);
@ -116,8 +117,12 @@ ObjectMgr::ObjectMgr()
m_hiGoGuid = 1; m_hiGoGuid = 1;
m_hiDoGuid = 1; m_hiDoGuid = 1;
m_hiCorpseGuid = 1; m_hiCorpseGuid = 1;
m_hiPetNumber = 1; m_hiPetNumber = 1;
m_ItemTextId = 1;
m_mailid = 1;
m_auctionid = 1;
m_guildId = 1;
m_arenaTeamId = 1;
mGuildBankTabPrice.resize(GUILD_BANK_MAX_TABS); mGuildBankTabPrice.resize(GUILD_BANK_MAX_TABS);
mGuildBankTabPrice[0] = 100; mGuildBankTabPrice[0] = 100;
@ -5132,7 +5137,6 @@ void ObjectMgr::SetHighestGuids()
if( result ) if( result )
{ {
m_hiCharGuid = (*result)[0].GetUInt32()+1; m_hiCharGuid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5140,7 +5144,6 @@ void ObjectMgr::SetHighestGuids()
if( result ) if( result )
{ {
m_hiCreatureGuid = (*result)[0].GetUInt32()+1; m_hiCreatureGuid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5153,7 +5156,6 @@ void ObjectMgr::SetHighestGuids()
if( result ) if( result )
{ {
m_hiItemGuid = (*result)[0].GetUInt32()+1; m_hiItemGuid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5167,7 +5169,6 @@ void ObjectMgr::SetHighestGuids()
if( result ) if( result )
{ {
m_hiGoGuid = (*result)[0].GetUInt32()+1; m_hiGoGuid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5175,39 +5176,27 @@ void ObjectMgr::SetHighestGuids()
if( result ) if( result )
{ {
m_auctionid = (*result)[0].GetUInt32()+1; m_auctionid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
else
{
m_auctionid = 0;
}
result = CharacterDatabase.Query( "SELECT MAX(id) FROM mail" ); result = CharacterDatabase.Query( "SELECT MAX(id) FROM mail" );
if( result ) if( result )
{ {
m_mailid = (*result)[0].GetUInt32()+1; m_mailid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
else
{
m_mailid = 0;
}
result = CharacterDatabase.Query( "SELECT MAX(id) FROM item_text" ); result = CharacterDatabase.Query( "SELECT MAX(id) FROM item_text" );
if( result ) if( result )
{ {
m_ItemTextId = (*result)[0].GetUInt32(); m_ItemTextId = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
else
m_ItemTextId = 0;
result = CharacterDatabase.Query( "SELECT MAX(guid) FROM corpse" ); result = CharacterDatabase.Query( "SELECT MAX(guid) FROM corpse" );
if( result ) if( result )
{ {
m_hiCorpseGuid = (*result)[0].GetUInt32()+1; m_hiCorpseGuid = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5215,7 +5204,6 @@ void ObjectMgr::SetHighestGuids()
if (result) if (result)
{ {
m_arenaTeamId = (*result)[0].GetUInt32()+1; m_arenaTeamId = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
@ -5223,64 +5211,58 @@ void ObjectMgr::SetHighestGuids()
if (result) if (result)
{ {
m_guildId = (*result)[0].GetUInt32()+1; m_guildId = (*result)[0].GetUInt32()+1;
delete result; delete result;
} }
} }
uint32 ObjectMgr::GenerateArenaTeamId() uint32 ObjectMgr::GenerateArenaTeamId()
{ {
++m_arenaTeamId; if(m_arenaTeamId>=0xFFFFFFFE)
if(m_arenaTeamId>=0xFFFFFFFF)
{ {
sLog.outError("Arena team ids overflow!! Can't continue, shutting down server. "); sLog.outError("Arena team ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_arenaTeamId; return m_arenaTeamId++;
} }
uint32 ObjectMgr::GenerateGuildId() uint32 ObjectMgr::GenerateGuildId()
{ {
++m_guildId; if(m_guildId>=0xFFFFFFFE)
if(m_guildId>=0xFFFFFFFF)
{ {
sLog.outError("Guild ids overflow!! Can't continue, shutting down server. "); sLog.outError("Guild ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_guildId; return m_guildId++;
} }
uint32 ObjectMgr::GenerateAuctionID() uint32 ObjectMgr::GenerateAuctionID()
{ {
++m_auctionid; if(m_auctionid>=0xFFFFFFFE)
if(m_auctionid>=0xFFFFFFFF)
{ {
sLog.outError("Auctions ids overflow!! Can't continue, shutting down server. "); sLog.outError("Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_auctionid; return m_auctionid++;
} }
uint32 ObjectMgr::GenerateMailID() uint32 ObjectMgr::GenerateMailID()
{ {
++m_mailid; if(m_mailid>=0xFFFFFFFE)
if(m_mailid>=0xFFFFFFFF)
{ {
sLog.outError("Mail ids overflow!! Can't continue, shutting down server. "); sLog.outError("Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_mailid; return m_mailid++;
} }
uint32 ObjectMgr::GenerateItemTextID() uint32 ObjectMgr::GenerateItemTextID()
{ {
++m_ItemTextId; if(m_ItemTextId>=0xFFFFFFFE)
if(m_ItemTextId>=0xFFFFFFFF)
{ {
sLog.outError("Item text ids overflow!! Can't continue, shutting down server. "); sLog.outError("Item text ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_ItemTextId; return m_ItemTextId++;
} }
uint32 ObjectMgr::CreateItemText(std::string text) uint32 ObjectMgr::CreateItemText(std::string text)
@ -5302,29 +5284,26 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
switch(guidhigh) switch(guidhigh)
{ {
case HIGHGUID_ITEM: case HIGHGUID_ITEM:
++m_hiItemGuid; if(m_hiItemGuid>=0xFFFFFFFE)
if(m_hiItemGuid>=0xFFFFFFFF)
{ {
sLog.outError("Item guid overflow!! Can't continue, shutting down server. "); sLog.outError("Item guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiItemGuid; return m_hiItemGuid++;
case HIGHGUID_UNIT: case HIGHGUID_UNIT:
++m_hiCreatureGuid; if(m_hiCreatureGuid>=0x00FFFFFE)
if(m_hiCreatureGuid>=0x00FFFFFF)
{ {
sLog.outError("Creature guid overflow!! Can't continue, shutting down server. "); sLog.outError("Creature guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiCreatureGuid; return m_hiCreatureGuid++;
case HIGHGUID_PET: case HIGHGUID_PET:
++m_hiPetGuid; if(m_hiPetGuid>=0x00FFFFFE)
if(m_hiPetGuid>=0x00FFFFFF)
{ {
sLog.outError("Pet guid overflow!! Can't continue, shutting down server. "); sLog.outError("Pet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiPetGuid; return m_hiPetGuid++;
case HIGHGUID_VEHICLE: case HIGHGUID_VEHICLE:
++m_hiVehicleGuid; ++m_hiVehicleGuid;
if(m_hiVehicleGuid>=0x00FFFFFF) if(m_hiVehicleGuid>=0x00FFFFFF)
@ -5332,39 +5311,35 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
sLog.outError("Vehicle guid overflow!! Can't continue, shutting down server. "); sLog.outError("Vehicle guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiVehicleGuid; return m_hiVehicleGuid++;
case HIGHGUID_PLAYER: case HIGHGUID_PLAYER:
++m_hiCharGuid; if(m_hiCharGuid>=0xFFFFFFFE)
if(m_hiCharGuid>=0xFFFFFFFF)
{ {
sLog.outError("Players guid overflow!! Can't continue, shutting down server. "); sLog.outError("Players guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiCharGuid; return m_hiCharGuid++;
case HIGHGUID_GAMEOBJECT: case HIGHGUID_GAMEOBJECT:
++m_hiGoGuid; if(m_hiGoGuid>=0x00FFFFFE)
if(m_hiGoGuid>=0x00FFFFFF)
{ {
sLog.outError("Gameobject guid overflow!! Can't continue, shutting down server. "); sLog.outError("Gameobject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiGoGuid; return m_hiGoGuid++;
case HIGHGUID_CORPSE: case HIGHGUID_CORPSE:
++m_hiCorpseGuid; if(m_hiCorpseGuid>=0xFFFFFFFE)
if(m_hiCorpseGuid>=0xFFFFFFFF)
{ {
sLog.outError("Corpse guid overflow!! Can't continue, shutting down server. "); sLog.outError("Corpse guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiCorpseGuid; return m_hiCorpseGuid++;
case HIGHGUID_DYNAMICOBJECT: case HIGHGUID_DYNAMICOBJECT:
++m_hiDoGuid; if(m_hiDoGuid>=0xFFFFFFFE)
if(m_hiDoGuid>=0xFFFFFFFF)
{ {
sLog.outError("DynamicObject guid overflow!! Can't continue, shutting down server. "); sLog.outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE); World::StopNow(ERROR_EXIT_CODE);
} }
return m_hiDoGuid; return m_hiDoGuid++;
default: default:
ASSERT(0); ASSERT(0);
} }
@ -7387,6 +7362,8 @@ void ObjectMgr::LoadDbScriptStrings()
CheckScripts(sGameObjectScripts,ids); CheckScripts(sGameObjectScripts,ids);
CheckScripts(sEventScripts,ids); CheckScripts(sEventScripts,ids);
WaypointMgr.CheckTextsExistance(ids);
for(std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) for(std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr)
sLog.outErrorDb( "Table `db_script_string` has unused string id %u", *itr); sLog.outErrorDb( "Table `db_script_string` has unused string id %u", *itr);
} }

View file

@ -778,12 +778,16 @@ class ObjectMgr
const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; } const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; }
uint32 GetScriptId(const char *name); uint32 GetScriptId(const char *name);
protected: protected:
// first free id for selected id type
uint32 m_auctionid; uint32 m_auctionid;
uint32 m_mailid; uint32 m_mailid;
uint32 m_ItemTextId; uint32 m_ItemTextId;
uint32 m_arenaTeamId; uint32 m_arenaTeamId;
uint32 m_guildId; uint32 m_guildId;
uint32 m_hiPetNumber;
// first free low guid for seelcted guid type
uint32 m_hiCharGuid; uint32 m_hiCharGuid;
uint32 m_hiCreatureGuid; uint32 m_hiCreatureGuid;
uint32 m_hiPetGuid; uint32 m_hiPetGuid;
@ -793,8 +797,6 @@ class ObjectMgr
uint32 m_hiDoGuid; uint32 m_hiDoGuid;
uint32 m_hiCorpseGuid; uint32 m_hiCorpseGuid;
uint32 m_hiPetNumber;
QuestMap mQuestTemplates; QuestMap mQuestTemplates;
typedef UNORDERED_MAP<uint32, GossipText*> GossipTextMap; typedef UNORDERED_MAP<uint32, GossipText*> GossipTextMap;

View file

@ -5194,6 +5194,10 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
x = GetPositionX(); x = GetPositionX();
y = GetPositionY(); y = GetPositionY();
z = GetPositionZ(); z = GetPositionZ();
// group update
if(GetGroup() && (old_x != x || old_y != y))
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
} }
// code block for underwater state update // code block for underwater state update
@ -5201,10 +5205,6 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
CheckExploreSystem(); CheckExploreSystem();
// group update
if(GetGroup())
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
return true; return true;
} }

View file

@ -389,7 +389,8 @@ DumpReturn PlayerDumpReader::LoadDump(std::string file, uint32 account, std::str
} }
else incHighest = false; else incHighest = false;
} }
else guid = objmgr.m_hiCharGuid; else
guid = objmgr.m_hiCharGuid;
// normalize the name if specified and check if it exists // normalize the name if specified and check if it exists
if(!normalizePlayerName(name)) if(!normalizePlayerName(name))

View file

@ -9719,6 +9719,9 @@ void Unit::SetMaxHealth(uint32 val)
void Unit::SetPower(Powers power, uint32 val) void Unit::SetPower(Powers power, uint32 val)
{ {
if(GetPower(power) == val)
return;
uint32 maxPower = GetMaxPower(power); uint32 maxPower = GetMaxPower(power);
if(maxPower < val) if(maxPower < val)
val = maxPower; val = maxPower;

View file

@ -122,32 +122,18 @@ void WaypointManager::Load()
be.emote = fields[7].GetUInt32(); be.emote = fields[7].GetUInt32();
be.spell = fields[8].GetUInt32(); be.spell = fields[8].GetUInt32();
// load and store without holes in array
int j = 0;
for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i) for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i)
{ {
be.textid[j] = fields[9+i].GetUInt32(); be.textid[i] = fields[9+i].GetUInt32();
if(be.textid[j]) if(be.textid[i])
{ {
if (be.textid[j] < MIN_DB_SCRIPT_STRING_ID || be.textid[j] >= MAX_DB_SCRIPT_STRING_ID) if (be.textid[i] < MIN_DB_SCRIPT_STRING_ID || be.textid[i] >= MAX_DB_SCRIPT_STRING_ID)
{ {
sLog.outErrorDb( "Table `db_script_string` not have string id %u", be.textid[j]); sLog.outErrorDb( "Table `db_script_string` not have string id %u", be.textid[i]);
continue; continue;
} }
if (!objmgr.GetMangosStringLocale (be.textid[j]))
{
sLog.outErrorDb("ERROR: Waypoint path %d (point %d), have invalid text id (%i) in `textid%d, ignored.",
id, point, be.textid[j], i+1);
continue;
}
++j; // to next internal field
} }
} }
// fill array tail
for(; j < MAX_WAYPOINT_TEXT; ++j)
be.textid[j] = 0;
// save memory by not storing empty behaviors // save memory by not storing empty behaviors
if(!be.isEmpty()) if(!be.isEmpty())
@ -306,3 +292,49 @@ void WaypointManager::SetNodeText(uint32 id, uint32 point, const char *text_fiel
if(field == "model2") node.behavior->model2 = text ? atoi(text) : 0; if(field == "model2") node.behavior->model2 = text ? atoi(text) : 0;
} }
} }
void WaypointManager::CheckTextsExistance(std::set<int32>& ids)
{
WaypointPathMap::iterator pmItr = m_pathMap.begin();
for ( ; pmItr != m_pathMap.end(); ++pmItr)
{
for (int i = 0; i < pmItr->second.size(); ++i)
{
if (!pmItr->second[i].behavior)
continue;
// Now we check text existence and put all zero texts ids to the end of array
// Counting leading zeros for futher textid shift
int zeroCount = 0;
for (int j = 0; j < MAX_WAYPOINT_TEXT; ++j)
{
if (!pmItr->second[i].behavior->textid[j])
{
++zeroCount;
continue;
}
else
{
if (!objmgr.GetMangosStringLocale(pmItr->second[i].behavior->textid[j]))
{
sLog.outErrorDb("ERROR: Some waypoint has textid%u with not existing %u text.", j, pmItr->second[i].behavior->textid[j]);
pmItr->second[i].behavior->textid[j] = 0;
++zeroCount;
continue;
}
else
ids.erase(pmItr->second[i].behavior->textid[j]);
// Shifting check
if (zeroCount)
{
// Correct textid but some zeros leading, so move it forward.
pmItr->second[i].behavior->textid[j-zeroCount] = pmItr->second[i].behavior->textid[j];
pmItr->second[i].behavior->textid[j] = 0;
}
}
}
}
}
}

View file

@ -76,6 +76,7 @@ class WaypointManager
void DeletePath(uint32 id); void DeletePath(uint32 id);
void SetNodePosition(uint32 id, uint32 point, float x, float y, float z); void SetNodePosition(uint32 id, uint32 point, float x, float y, float z);
void SetNodeText(uint32 id, uint32 point, const char *text_field, const char *text); void SetNodeText(uint32 id, uint32 point, const char *text_field, const char *text);
void CheckTextsExistance(std::set<int32>& ids);
private: private:
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid); void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "6838" #define REVISION_NR "6841"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__