Revert "Merge branch 'yubo'"

This reverts commit 5319587e80ed7e822944565cde8b9a437b8fc55c.
feature/prepare-cross-merge
Nuno 4 years ago committed by kaetemi
parent 619b5fd122
commit 5678ef1727
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) if (get)
{ {
fx = e->getState().X() / 1000; fx = e->getState().X() / 1000.f;
fy = e->getState().Y() / 1000; fy = e->getState().Y() / 1000.f;
fz = e->getState().Z() / 1000; fz = e->getState().Z() / 1000.f;
if (cell < 0) if (cell < 0)
value = toString ("%2.f,%2.f,%2.f@%d", fx, fy, fz, -cell); value = toString ("%.2f,%.2f,%.2f@%d", fx, fy, fz, -cell);
else else
value = toString ("%2.f,%2.f,%2.f", fx, fy, fz); value = toString ("%.2f,%.2f,%.2f", fx, fy, fz);
} }
else else
{ {

@ -87,10 +87,6 @@ bool CExchangeView::putItemInExchange(uint32 bagSlot, uint32 exchangeSlot, uint3
if (!item->getMovable() && _InterlocutorView != NULL && form->Family != ITEMFAMILY::PET_ANIMAL_TICKET && (!form->DropOrSell || item->getUnMovable())) if (!item->getMovable() && _InterlocutorView != NULL && form->Family != ITEMFAMILY::PET_ANIMAL_TICKET && (!form->DropOrSell || item->getUnMovable()))
return false; 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 // Can't trade items locked by owner
if (item->getLockedByOwner()) if (item->getLockedByOwner())
return false; return false;
@ -322,7 +318,7 @@ void CExchangeView::onInterlocutorSlotChanged(uint32 interlocutorGiveSlot)
{ {
const INVENTORIES::TItemId &itemId = item->getItemId(); const INVENTORIES::TItemId &itemId = item->getItemId();
RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown; RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown;
if (item->getCraftParameters() != NULL) if (item->getCraftParameters() != NULL)
itemBestStat = item->getCraftParameters()->getBestItemStat(); itemBestStat = item->getCraftParameters()->getBestItemStat();
@ -375,7 +371,7 @@ void CExchangeView::onInterlocutorSlotChanged(uint32 interlocutorGiveSlot)
// getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0); // getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0);
recvItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false); recvItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false);
} }
// increment the info version // increment the info version
// sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION"); // sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION");
uint8 nPropValue = recvItem.getINFO_VERSION(getCharacter()->_PropertyDatabase); uint8 nPropValue = recvItem.getINFO_VERSION(getCharacter()->_PropertyDatabase);
@ -397,7 +393,7 @@ void CExchangeView::updateExchangeSlot(uint32 exchangeSlot)
{ {
const INVENTORIES::TItemId &itemId = item->getItemId(); const INVENTORIES::TItemId &itemId = item->getItemId();
RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown; RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown;
if (item->getCraftParameters() != NULL) if (item->getCraftParameters() != NULL)
itemBestStat = item->getCraftParameters()->getBestItemStat(); itemBestStat = item->getCraftParameters()->getBestItemStat();
@ -450,7 +446,7 @@ void CExchangeView::updateExchangeSlot(uint32 exchangeSlot)
// getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0); // getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0);
giveItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false); giveItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false);
} }
// increment the info version // increment the info version
// sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION"); // sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION");
uint8 nPropValue = giveItem.getINFO_VERSION(getCharacter()->_PropertyDatabase); uint8 nPropValue = giveItem.getINFO_VERSION(getCharacter()->_PropertyDatabase);

@ -170,6 +170,27 @@ void CGuildCharProxy::tpWanted( sint32 x, sint32 y, sint32 z , bool useHeading,
_ModuleCore->tpWanted(x,y,z,useHeading,heading,continent,cell); _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() void CGuildCharProxy::updateOutpostAdminFlagInDB()
{ {

@ -65,7 +65,11 @@ public:
uint16 getMainPlace(); uint16 getMainPlace();
void updateTargetingChars(); void updateTargetingChars();
const TDataSetRow & getEntityRowId(); const TDataSetRow & getEntityRowId();
void tpWanted( sint32 x, sint32 y, sint32 z , bool useHeading = false, float heading = 0.0f , uint8 continent = 0xFF, sint32 cell = 0); 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 updateOutpostAdminFlagInDB(); void updateOutpostAdminFlagInDB();
//@} //@}
}; };

@ -581,6 +581,25 @@ void CGuildMemberModule::clearOnlineGuildProperties()
targetProxy.tpWanted(x,y,z,true,heading); 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,7 +1711,6 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [insta
if (building) if (building)
c->setBuildingExitZone(building->getDefaultExitSpawn()); c->setBuildingExitZone(building->getDefaultExitSpawn());
} }
} }
log.displayNL("%d", cell); log.displayNL("%d", cell);

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

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

Loading…
Cancel
Save