diff --git a/ryzom/server/src/entities_game_service/admin.cpp b/ryzom/server/src/entities_game_service/admin.cpp index 546fd3310..56dfafa2d 100644 --- a/ryzom/server/src/entities_game_service/admin.cpp +++ b/ryzom/server/src/entities_game_service/admin.cpp @@ -1195,13 +1195,13 @@ ENTITY_VARIABLE(Position, "Position of a player (in meter) ,[, 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 { diff --git a/ryzom/server/src/entities_game_service/game_item_manager/player_inv_xchg.cpp b/ryzom/server/src/entities_game_service/game_item_manager/player_inv_xchg.cpp index acef0766b..db9d163f4 100644 --- a/ryzom/server/src/entities_game_service/game_item_manager/player_inv_xchg.cpp +++ b/ryzom/server/src/entities_game_service/game_item_manager/player_inv_xchg.cpp @@ -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; @@ -318,7 +322,7 @@ void CExchangeView::onInterlocutorSlotChanged(uint32 interlocutorGiveSlot) { const INVENTORIES::TItemId &itemId = item->getItemId(); RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown; - + if (item->getCraftParameters() != NULL) itemBestStat = item->getCraftParameters()->getBestItemStat(); @@ -371,7 +375,7 @@ void CExchangeView::onInterlocutorSlotChanged(uint32 interlocutorGiveSlot) // getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0); recvItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false); } - + // increment the info version // sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION"); uint8 nPropValue = recvItem.getINFO_VERSION(getCharacter()->_PropertyDatabase); @@ -393,7 +397,7 @@ void CExchangeView::updateExchangeSlot(uint32 exchangeSlot) { const INVENTORIES::TItemId &itemId = item->getItemId(); RM_FABER_STAT_TYPE::TRMStatType itemBestStat = RM_FABER_STAT_TYPE::Unknown; - + if (item->getCraftParameters() != NULL) itemBestStat = item->getCraftParameters()->getBestItemStat(); @@ -446,7 +450,7 @@ void CExchangeView::updateExchangeSlot(uint32 exchangeSlot) // getCharacter()->_PropertyDatabase.setProp(sDBPath+":PREREQUISIT_VALID", 0); giveItem.setPREREQUISIT_VALID(getCharacter()->_PropertyDatabase, false); } - + // increment the info version // sint64 nPropValue = getCharacter()->_PropertyDatabase.getProp(sDBPath+":INFO_VERSION"); uint8 nPropValue = giveItem.getINFO_VERSION(getCharacter()->_PropertyDatabase); diff --git a/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.cpp b/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.cpp index ad41d0f3e..418685623 100644 --- a/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.cpp +++ b/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.cpp @@ -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() { diff --git a/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.h b/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.h index 44016db24..5bfaa0813 100644 --- a/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.h +++ b/ryzom/server/src/entities_game_service/guild_manager/guild_char_proxy.h @@ -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(); //@} }; diff --git a/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp b/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp index 70a1c5f44..e798d2739 100644 --- a/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp +++ b/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp @@ -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); - } - } - } } } diff --git a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp index c48a806e0..d4af9deae 100644 --- a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp +++ b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp @@ -1711,6 +1711,7 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", " [playername] [insta if (building) c->setBuildingExitZone(building->getDefaultExitSpawn()); } + } log.displayNL("%d", cell); diff --git a/ryzom/server/src/entities_game_service/outpost_manager/outpost_state_machine.cpp b/ryzom/server/src/entities_game_service/outpost_manager/outpost_state_machine.cpp index 6c80d8d72..826ed7f89 100644 --- a/ryzom/server/src/entities_game_service/outpost_manager/outpost_state_machine.cpp +++ b/ryzom/server/src/entities_game_service/outpost_manager/outpost_state_machine.cpp @@ -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); diff --git a/ryzom/server/src/entities_game_service/zone_manager.cpp b/ryzom/server/src/entities_game_service/zone_manager.cpp index 96dbaaa11..3f57db6bb 100644 --- a/ryzom/server/src/entities_game_service/zone_manager.cpp +++ b/ryzom/server/src/entities_game_service/zone_manager.cpp @@ -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(spawn))->setPlaceType(_PlaceType);