diff --git a/ryzom/server/src/entities_game_service/admin.cpp b/ryzom/server/src/entities_game_service/admin.cpp index 56dfafa2d..546fd3310 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; - fy = e->getState().Y() / 1000; - fz = e->getState().Z() / 1000; + fx = e->getState().X() / 1000.f; + fy = e->getState().Y() / 1000.f; + fz = e->getState().Z() / 1000.f; if (cell < 0) - 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); + value = toString ("%.2f,%.2f,%.2f@%d", fx, fy, fz, -cell); + else + value = toString ("%.2f,%.2f,%.2f", 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 db9d163f4..acef0766b 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,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())) 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; @@ -322,7 +318,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(); @@ -375,7 +371,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); @@ -397,7 +393,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(); @@ -450,7 +446,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 418685623..ad41d0f3e 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,6 +170,27 @@ 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 5bfaa0813..44016db24 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,7 +65,11 @@ 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); + 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(); //@} }; 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 e798d2739..70a1c5f44 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,6 +581,25 @@ 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 d4af9deae..c48a806e0 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,7 +1711,6 @@ 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 826ed7f89..6c80d8d72 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+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 if (computeSquadCountB(_FightData._CurrentCombatLevel) > 0) actionSetTimer1(computeSpawnDelay(_FightData._CurrentCombatLevel)); //< SpawnTimer @@ -217,22 +217,20 @@ void COutpost::eventTriggered(OUTPOSTENUMS::TOutpostEvent event, void* eventPara bool won; if (_FightData._KilledSquads < (_FightData._SpawnedSquadsA+_FightData._SpawnedSquadsB)) { - if (_FightData._CurrentCombatLevel > 1) - _FightData._CurrentCombatLevel -= 2; - if (_FightData._CurrentCombatLevel > 0) - _FightData._CurrentCombatLevel--; + if (_FightData._CurrentCombatLevel>0) + --_FightData._CurrentCombatLevel; won = false; } else { - _FightData._CurrentCombatLevel += 2; + ++_FightData._CurrentCombatLevel; if (_FightData._CurrentCombatLevel > _FightData._MaxAttackLevel) _FightData._MaxAttackLevel = _FightData._CurrentCombatLevel; won = true; } actionPayBackAliveSquads(OUTPOSTENUMS::OutpostOwner); actionDespawnAllSquads(); - _FightData._CurrentCombatRound += 2; + ++_FightData._CurrentCombatRound; // If that was last round finish fight if (_FightData._CurrentCombatRound>=computeRoundCount()) { @@ -313,15 +311,14 @@ void COutpost::eventTriggered(OUTPOSTENUMS::TOutpostEvent event, void* eventPara { if (_FightData._MaxAttackLevel > _CurrentOutpostLevel) { - // Changes Made By Ulukyn for Outpost Refactoring Project - //if (!isBelongingToAGuild()) - //{ - _CurrentOutpostLevel = _FightData._MaxAttackLevel; - actionChangeOwner(); - actionPostNextState(Peace); - //} - //else - // actionPostNextState(DefenseBefore); + 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 3f57db6bb..96dbaaa11 100644 --- a/ryzom/server/src/entities_game_service/zone_manager.cpp +++ b/ryzom/server/src/entities_game_service/zone_manager.cpp @@ -373,7 +373,6 @@ 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);