Merge branch 'yubo'

feature/prepare-cross-merge
Nuno 4 years ago committed by kaetemi
parent a58af169ab
commit 619b5fd122
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -1195,13 +1195,13 @@ ENTITY_VARIABLE(Position, "Position of a player (in meter) <eid> <posx>,<posy>[,
if (get)
{
fx = e->getState().X() / 1000.f;
fy = e->getState().Y() / 1000.f;
fz = e->getState().Z() / 1000.f;
fx = e->getState().X() / 1000;
fy = e->getState().Y() / 1000;
fz = e->getState().Z() / 1000;
if (cell < 0)
value = toString ("%.2f,%.2f,%.2f@%d", fx, fy, fz, -cell);
else
value = toString ("%.2f,%.2f,%.2f", fx, fy, fz);
value = toString ("%2.f,%2.f,%2.f@%d", fx, fy, fz, -cell);
else
value = toString ("%2.f,%2.f,%2.f", fx, fy, fz);
}
else
{

@ -87,6 +87,10 @@ bool CExchangeView::putItemInExchange(uint32 bagSlot, uint32 exchangeSlot, uint3
if (!item->getMovable() && _InterlocutorView != NULL && form->Family != ITEMFAMILY::PET_ANIMAL_TICKET && (!form->DropOrSell || item->getUnMovable()))
return false;
// pet animal ticket must be exchangeable only if shardExchangeable
if (form->Family == ITEMFAMILY::PET_ANIMAL_TICKET && !form->ShardExchangeable)
return false;
// Can't trade items locked by owner
if (item->getLockedByOwner())
return false;

@ -170,27 +170,6 @@ void CGuildCharProxy::tpWanted( sint32 x, sint32 y, sint32 z , bool useHeading,
_ModuleCore->tpWanted(x,y,z,useHeading,heading,continent,cell);
}
sint32 CGuildCharProxy::getPowoCell() const
{
return _ModuleCore->getPowoCell();
}
const std::string &CGuildCharProxy::getPowoScope() const
{
return _ModuleCore->getPowoScope();
}
NLMISC::CVector CGuildCharProxy::getBuildingExitPos() const
{
return _ModuleCore->getBuildingExitPos();
}
uint16 CGuildCharProxy::getBuildingExitZone() const
{
return _ModuleCore->getBuildingExitZone();
}
//----------------------------------------------------------------------------
void CGuildCharProxy::updateOutpostAdminFlagInDB()
{

@ -65,11 +65,7 @@ public:
uint16 getMainPlace();
void updateTargetingChars();
const TDataSetRow & getEntityRowId();
void tpWanted(sint32 x, sint32 y, sint32 z, bool useHeading = false, float heading = 0.0f, uint8 continent = 0xFF, sint32 cell = 0);
sint32 getPowoCell() const;
const std::string &getPowoScope() const;
NLMISC::CVector getBuildingExitPos() const;
uint16 getBuildingExitZone() const;
void tpWanted( sint32 x, sint32 y, sint32 z , bool useHeading = false, float heading = 0.0f , uint8 continent = 0xFF, sint32 cell = 0);
void updateOutpostAdminFlagInDB();
//@}
};

@ -581,25 +581,6 @@ void CGuildMemberModule::clearOnlineGuildProperties()
targetProxy.tpWanted(x,y,z,true,heading);
}
}
else if (targetProxy.getPowoCell() == cell && targetProxy.getPowoScope() == "guild")
{
CVector exitPos = targetProxy.getBuildingExitPos();
if (exitPos.x != 0)
{
targetProxy.tpWanted(exitPos.x, exitPos.y, exitPos.z);
}
else
{
const CTpSpawnZone* zone = CZoneManager::getInstance().getTpSpawnZone(targetProxy.getBuildingExitZone());
if (zone)
{
sint32 x, y, z;
float heading;
zone->getRandomPoint(x, y, z, heading);
targetProxy.tpWanted(x, y, z, true, heading);
}
}
}
}
}

@ -1711,6 +1711,7 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [insta
if (building)
c->setBuildingExitZone(building->getDefaultExitSpawn());
}
}
log.displayNL("%d", cell);

@ -193,7 +193,7 @@ void COutpost::eventTriggered(OUTPOSTENUMS::TOutpostEvent event, void* eventPara
case AttackRound: { switch (event) {
case StartOfState: // Init the round
{
OUTPOST_INF("Outpost %s: Starting attack round %d, level %d", _Name.c_str(), _FightData._CurrentCombatRound+1, _FightData._CurrentCombatLevel+1);
OUTPOST_INF("Outpost %s: Starting attack round %d, level %d", _Name.c_str(), _FightData._CurrentCombatRound+2, _FightData._CurrentCombatLevel+2);
actionSetTimer0(computeRoundTime()); //< Round timer
if (computeSquadCountB(_FightData._CurrentCombatLevel) > 0)
actionSetTimer1(computeSpawnDelay(_FightData._CurrentCombatLevel)); //< SpawnTimer
@ -217,20 +217,22 @@ void COutpost::eventTriggered(OUTPOSTENUMS::TOutpostEvent event, void* eventPara
bool won;
if (_FightData._KilledSquads < (_FightData._SpawnedSquadsA+_FightData._SpawnedSquadsB))
{
if (_FightData._CurrentCombatLevel>0)
--_FightData._CurrentCombatLevel;
if (_FightData._CurrentCombatLevel > 1)
_FightData._CurrentCombatLevel -= 2;
if (_FightData._CurrentCombatLevel > 0)
_FightData._CurrentCombatLevel--;
won = false;
}
else
{
++_FightData._CurrentCombatLevel;
_FightData._CurrentCombatLevel += 2;
if (_FightData._CurrentCombatLevel > _FightData._MaxAttackLevel)
_FightData._MaxAttackLevel = _FightData._CurrentCombatLevel;
won = true;
}
actionPayBackAliveSquads(OUTPOSTENUMS::OutpostOwner);
actionDespawnAllSquads();
++_FightData._CurrentCombatRound;
_FightData._CurrentCombatRound += 2;
// If that was last round finish fight
if (_FightData._CurrentCombatRound>=computeRoundCount())
{
@ -311,14 +313,15 @@ void COutpost::eventTriggered(OUTPOSTENUMS::TOutpostEvent event, void* eventPara
{
if (_FightData._MaxAttackLevel > _CurrentOutpostLevel)
{
if (!isBelongingToAGuild())
{
_CurrentOutpostLevel = _FightData._MaxAttackLevel;
actionChangeOwner();
actionPostNextState(Peace);
}
else
actionPostNextState(DefenseBefore);
// Changes Made By Ulukyn for Outpost Refactoring Project
//if (!isBelongingToAGuild())
//{
_CurrentOutpostLevel = _FightData._MaxAttackLevel;
actionChangeOwner();
actionPostNextState(Peace);
//}
//else
// actionPostNextState(DefenseBefore);
}
else
actionPostNextState(Peace);

@ -373,6 +373,7 @@ bool CPlace::build(const NLLIGO::CPrimZone * zone,uint16 id, bool reportAutorise
spawn->getType() == RESPAWN_POINT::KARAVAN ||
spawn->getType() == RESPAWN_POINT::RANGER ||
spawn->getType() == RESPAWN_POINT::NEWBIELAND ||
spawn->getType() == RESPAWN_POINT::RANGER ||
spawn->getType() == RESPAWN_POINT::RESPAWNABLE )
{
(const_cast<CTpSpawnZone *>(spawn))->setPlaceType(_PlaceType);

Loading…
Cancel
Save