|
|
@ -32,6 +32,7 @@
|
|
|
|
#include "nel/gui/action_handler.h"
|
|
|
|
#include "nel/gui/action_handler.h"
|
|
|
|
#include "../dummy_progress.h"
|
|
|
|
#include "../dummy_progress.h"
|
|
|
|
#include "group_compas.h"
|
|
|
|
#include "group_compas.h"
|
|
|
|
|
|
|
|
#include "group_html_cs.h"
|
|
|
|
#include "../connection.h"
|
|
|
|
#include "../connection.h"
|
|
|
|
#include "../net_manager.h"
|
|
|
|
#include "../net_manager.h"
|
|
|
|
#include "people_interraction.h" // for MaxNumPeopleInTeam
|
|
|
|
#include "people_interraction.h" // for MaxNumPeopleInTeam
|
|
|
@ -1207,22 +1208,54 @@ void CGroupMap::checkCoords()
|
|
|
|
|
|
|
|
|
|
|
|
// **** retrieve pos of respawn and update it, or hide it if there's no target
|
|
|
|
// **** retrieve pos of respawn and update it, or hide it if there's no target
|
|
|
|
uint i;
|
|
|
|
uint i;
|
|
|
|
|
|
|
|
uint offset = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!_ArkPoints.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset = _ArkPoints.size();
|
|
|
|
|
|
|
|
if (_ArkPoints.size() < _RespawnLM.size())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (i = (uint)_ArkPoints.size(); i < _RespawnLM.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
delCtrl(_RespawnLM[i]);
|
|
|
|
|
|
|
|
_RespawnLM[i] = NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_ArkPoints.empty()) // Ark points replace Respawn Points
|
|
|
|
_RespawnLM.resize(_ArkPoints.size(), NULL);
|
|
|
|
|
|
|
|
for(i = 0; i < _ArkPoints.size(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_RespawnPos.size() < _RespawnLM.size())
|
|
|
|
if (_RespawnLM[i] == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (i = (uint)_RespawnPos.size(); i < _RespawnLM.size(); i++)
|
|
|
|
_RespawnLM[i] = createArkPointButton(_ArkPoints[i]);
|
|
|
|
|
|
|
|
_RespawnLM[i]->setId(this->getId() + ":arklm_" + NLMISC::toString(i));
|
|
|
|
|
|
|
|
_RespawnLM[i]->setParent(this);
|
|
|
|
|
|
|
|
ucstring title;
|
|
|
|
|
|
|
|
title.fromUtf8(_ArkPoints[i].Title);
|
|
|
|
|
|
|
|
_RespawnLM[i]->setDefaultContextHelp(title);
|
|
|
|
|
|
|
|
_RespawnLM[i]->HandleEvents = true;
|
|
|
|
|
|
|
|
addCtrl(_RespawnLM[i]);
|
|
|
|
|
|
|
|
updateLMPosFromDBPos(_RespawnLM[i], _ArkPoints[i].x, _ArkPoints[i].y);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_ArkPoints.empty() || !isIsland())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (offset + _RespawnPos.size() < _RespawnLM.size())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (i = offset + _RespawnPos.size(); i < _RespawnLM.size(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delCtrl(_RespawnLM[i]);
|
|
|
|
delCtrl(_RespawnLM[i]);
|
|
|
|
_RespawnLM[i] = NULL;
|
|
|
|
_RespawnLM[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_RespawnLM.resize(_RespawnPos.size(), NULL);
|
|
|
|
_RespawnLM.resize(offset + _RespawnPos.size(), NULL);
|
|
|
|
for(i = 0; i < _RespawnPos.size(); ++i)
|
|
|
|
for(int j = 0; j < _RespawnPos.size(); ++j)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
i = offset + j;
|
|
|
|
if (_RespawnLM[i] == NULL)
|
|
|
|
if (_RespawnLM[i] == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_RespawnLM[i] = createLandMarkButton(_RespawnLMOptions);
|
|
|
|
_RespawnLM[i] = createLandMarkButton(_RespawnLMOptions);
|
|
|
@ -1245,37 +1278,10 @@ void CGroupMap::checkCoords()
|
|
|
|
addCtrl(_RespawnLM[i]);
|
|
|
|
addCtrl(_RespawnLM[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_RespawnLM[i])
|
|
|
|
if (_RespawnLM[i])
|
|
|
|
updateLMPosFromDBPos(_RespawnLM[i], _RespawnPos[i].x, _RespawnPos[i].y);
|
|
|
|
updateLMPosFromDBPos(_RespawnLM[i], _RespawnPos[j].x, _RespawnPos[j].y);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_ArkPoints.size() < _RespawnLM.size())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (i = (uint)_ArkPoints.size(); i < _RespawnLM.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
delCtrl(_RespawnLM[i]);
|
|
|
|
|
|
|
|
_RespawnLM[i] = NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_RespawnLM.resize(_ArkPoints.size(), NULL);
|
|
|
|
|
|
|
|
for(i = 0; i < _ArkPoints.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_RespawnLM[i] == NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_RespawnLM[i] = createArkPointButton(_ArkPoints[i]);
|
|
|
|
|
|
|
|
_RespawnLM[i]->setId(this->getId() + ":arklm_" + NLMISC::toString(i));
|
|
|
|
|
|
|
|
_RespawnLM[i]->setParent(this);
|
|
|
|
|
|
|
|
ucstring title;
|
|
|
|
|
|
|
|
title.fromUtf8(_ArkPoints[i].Title);
|
|
|
|
|
|
|
|
_RespawnLM[i]->setDefaultContextHelp(title);
|
|
|
|
|
|
|
|
_RespawnLM[i]->HandleEvents = true;
|
|
|
|
|
|
|
|
addCtrl(_RespawnLM[i]);
|
|
|
|
|
|
|
|
updateLMPosFromDBPos(_RespawnLM[i], _ArkPoints[i].x, _ArkPoints[i].y);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((_MapMode == MapMode_Death) || (_MapMode == MapMode_SpawnSquad))
|
|
|
|
if ((_MapMode == MapMode_Death) || (_MapMode == MapMode_SpawnSquad))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2271,6 +2277,21 @@ void CGroupMap::setMap(SMap *map)
|
|
|
|
invalidateCoords();
|
|
|
|
invalidateCoords();
|
|
|
|
createContinentLandMarks();
|
|
|
|
createContinentLandMarks();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nlinfo("setMap (%f,%f) (%f,%f)", _CurMap->MinX, _CurMap->MinY, _CurMap->MaxX, _CurMap->MaxY);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
delArkPoints();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:lm_events:html"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (groupHtml)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
groupHtml->setHome(groupHtml->Home+toString("&min_x=%f&min_y=%f&max_x=%f&max_y=%f", _CurMap->MinX, _CurMap->MinY, _CurMap->MaxX, _CurMap->MaxY));
|
|
|
|
|
|
|
|
if (groupHtml->isBrowsing())
|
|
|
|
|
|
|
|
groupHtml->stopBrowse();
|
|
|
|
|
|
|
|
groupHtml->browse(groupHtml->Home.c_str());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_CurContinent != NULL)
|
|
|
|
if (_CurContinent != NULL)
|
|
|
|
_MapMaterial.setTexture(1, _CurContinent->FoW.Tx);
|
|
|
|
_MapMaterial.setTexture(1, _CurContinent->FoW.Tx);
|
|
|
|
else
|
|
|
|
else
|
|
|
|