Merge branch 'ark'

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

@ -1253,6 +1253,7 @@ CGameItemPtr CGameItem::getItemCopy()
item->_LostHPremains = 0.0f; item->_LostHPremains = 0.0f;
item->_PhraseId = _PhraseId; item->_PhraseId = _PhraseId;
item->_RequiredFaction = _RequiredFaction; item->_RequiredFaction = _RequiredFaction;
item->_RequiredPowo = _RequiredPowo;
item->computeItemWornState(); item->computeItemWornState();
log_Item_Create(item->getItemId(), item->getSheetId(), item->getStackSize(), item->quality()); log_Item_Create(item->getItemId(), item->getSheetId(), item->getStackSize(), item->quality());
@ -1428,6 +1429,7 @@ void CGameItem::clear()
_TypeSkillMods.clear(); _TypeSkillMods.clear();
_PhraseId.clear(); _PhraseId.clear();
_RequiredFaction.clear(); _RequiredFaction.clear();
_RequiredPowo.clear();
_CustomText.clear(); _CustomText.clear();
} }

@ -691,6 +691,11 @@ public :
/// set Required Faction /// set Required Faction
inline void setRequiredFaction(const std::string & str){ _RequiredFaction = str;} inline void setRequiredFaction(const std::string & str){ _RequiredFaction = str;}
/// get Required Powo
inline const std::string & getRequiredPowo() const { return _RequiredPowo;}
/// set Required Pow
inline void setRequiredPowo(const std::string & str){ _RequiredPowo = str;}
inline bool getLockedByOwner() const { return _LockedByOwner; } inline bool getLockedByOwner() const { return _LockedByOwner; }
void setLockedByOwner(bool value); void setLockedByOwner(bool value);
@ -964,6 +969,7 @@ private:
// required skill // required skill
bool _UseNewSystemRequirement; bool _UseNewSystemRequirement;
std::string _RequiredFaction; std::string _RequiredFaction;
std::string _RequiredPowo;
SKILLS::ESkills _RequiredSkill; SKILLS::ESkills _RequiredSkill;
uint16 _RequiredSkillLevel; uint16 _RequiredSkillLevel;
SKILLS::ESkills _RequiredSkill2; SKILLS::ESkills _RequiredSkill2;

@ -79,6 +79,10 @@ bool CMissionItem::buildFromScript(const std::vector<std::string> & script) {
_CustomName.fromUtf8(hex_decode(args[1])); _CustomName.fromUtf8(hex_decode(args[1]));
else if(!nlstricmp(args[0], "CustomText")) else if(!nlstricmp(args[0], "CustomText"))
_CustomText.fromUtf8(hex_decode(args[1])); _CustomText.fromUtf8(hex_decode(args[1]));
else if(!nlstricmp(args[0], "RequiredFaction"))
_RequiredFaction = args[1];
else if(!nlstricmp(args[0], "RequiredPowo"))
_RequiredPowo = args[1];
else else
{ {
float value; float value;
@ -274,6 +278,12 @@ void CMissionItem::setItemParam(CGameItemPtr item)
if (!_CustomName.empty()) if (!_CustomName.empty())
item->setCustomName(_CustomName); item->setCustomName(_CustomName);
if (!_RequiredFaction.empty())
item->setRequiredFaction(_RequiredFaction);
if (!_RequiredPowo.empty())
item->setRequiredPowo(_RequiredPowo);
} }
}// CMissionItem::setItemParam }// CMissionItem::setItemParam

@ -63,6 +63,8 @@ private:
NLMISC::CSheetId _SPhraseId; NLMISC::CSheetId _SPhraseId;
ucstring _CustomText; ucstring _CustomText;
ucstring _CustomName; ucstring _CustomName;
std::string _RequiredFaction;
std::string _RequiredPowo;
}; };

@ -825,7 +825,6 @@ NLMISC_COMMAND(getItemList, "get list of items of character by filter", "<uid> [
CInventoryPtr childSrc = c->getInventory(inventories[i]); CInventoryPtr childSrc = c->getInventory(inventories[i]);
if (childSrc != NULL) if (childSrc != NULL)
{ {
uint32 k = 0;
log.displayNL("#%s", INVENTORIES::toString(inventories[i]).c_str()); log.displayNL("#%s", INVENTORIES::toString(inventories[i]).c_str());
for (uint j = 0; j < childSrc->getSlotCount(); j++) for (uint j = 0; j < childSrc->getSlotCount(); j++)
@ -1657,7 +1656,7 @@ NLMISC_COMMAND(setFaction, "set the faction of player", "<uid> <faction> [<civ>]
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [instance] [exit_pos] [can_xp,cant_dead,can_teleport,can_speedup] [access_room_inv,access_guild_room] [scope]") NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [instance] [exit_pos] [can_xp,cant_dead,can_teleport,can_speedup,can_dp,onetry] [access_room_inv,access_guild_room] [scope]")
{ {
if (args.size() < 2) if (args.size() < 2)
return false; return false;
@ -1670,12 +1669,12 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [insta
else else
building = CBuildingManager::getInstance()->getBuildingPhysicalsByName("building_instance_ZO_player_111"); building = CBuildingManager::getInstance()->getBuildingPhysicalsByName("building_instance_ZO_player_111");
string powoFlags = "0000"; string powoFlags = "000000";
if (args.size() > 4) if (args.size() > 4 && args[4].length() == 6)
powoFlags = args[4]; powoFlags = args[4];
string invFlags = "00"; string invFlags = "00";
if (args.size() > 5) if (args.size() > 5 && args[5].length() == 2)
invFlags = args[5]; invFlags = args[5];
if (building) if (building)
@ -1701,9 +1700,12 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", "<uid> [playername] [insta
c->setPowoScope(args[6]); c->setPowoScope(args[6]);
c->setPowoFlag("xp", powoFlags[0] == '1'); c->setPowoFlag("xp", powoFlags[0] == '1');
c->setPowoFlag("dead", powoFlags[1] == '1'); c->setPowoFlag("nodead", powoFlags[1] == '1');
c->setPowoFlag("teleport", powoFlags[2] == '1'); c->setPowoFlag("teleport", powoFlags[2] == '1');
c->setPowoFlag("speed", powoFlags[3] == '1'); c->setPowoFlag("speed", powoFlags[3] == '1');
c->setPowoFlag("dp", powoFlags[4] == '1');
c->setPowoFlag("retry", powoFlags[5] == '1');
c->setPowoFlag("room_inv", invFlags[0] == '1'); c->setPowoFlag("room_inv", invFlags[0] == '1');
c->setPowoFlag("guild_inv", invFlags[1] == '1'); c->setPowoFlag("guild_inv", invFlags[1] == '1');
@ -3357,6 +3359,8 @@ NLMISC_COMMAND(spawnPlayerPet, "spawn player pet", "<uid> <slot>")
uint32 index; uint32 index;
fromString(args[1], index); fromString(args[1], index);
c->setPetStatus(index, CPetAnimal::waiting_spawn);
c->updateOnePetDatabase(index, false);
c->removeAnimalIndex(index, CPetCommandMsg::DESPAWN); c->removeAnimalIndex(index, CPetCommandMsg::DESPAWN);
c->setAnimalPosition(index, c->getState().X, c->getState().Y); c->setAnimalPosition(index, c->getState().X, c->getState().Y);
if (!c->spawnCharacterAnimal(index)) if (!c->spawnCharacterAnimal(index))

@ -573,7 +573,7 @@ CCharacter::CCharacter()
_DeathPenaltyTimer.setRemaining(1, new CDeathPenaltiesTimerEvent(this), 1); _DeathPenaltyTimer.setRemaining(1, new CDeathPenaltiesTimerEvent(this), 1);
_BarUpdateTimer.setRemaining(1, new CCharacterBarUpdateTimerEvent(this), 1); _BarUpdateTimer.setRemaining(1, new CCharacterBarUpdateTimerEvent(this), 1);
_BuildingExitZone = 0xffff; _BuildingExitZone = 0xffff;
_BuildingExitPos = CVector(); _BuildingExitPos = CVector(0, 0, 0);
_BuildingExitPos.x = 0; _BuildingExitPos.x = 0;
_BuildingExitPos.y = 0; _BuildingExitPos.y = 0;
_RespawnMainLandInTown = false; _RespawnMainLandInTown = false;
@ -5694,6 +5694,25 @@ void CCharacter::teleportCharacter(sint32 x, sint32 y, sint32 z, bool teleportWi
_PowoCell = 0; _PowoCell = 0;
CBuildingManager::getInstance()->removePlayerFromRoom(this, false); CBuildingManager::getInstance()->removePlayerFromRoom(this, false);
getRespawnPoints().setArkRespawnpoint(0, 0, 0); getRespawnPoints().setArkRespawnpoint(0, 0, 0);
CInventoryPtr childSrc = getInventory(INVENTORIES::bag);
if (childSrc != NULL)
{
for (uint j = 0; j < childSrc->getSlotCount(); j++)
{
CGameItemPtr itemPtr = childSrc->getItem(j);
if (itemPtr != NULL)
{
if (!itemPtr->getRequiredPowo().empty())
{
if (itemPtr->getRequiredPowo() != _PowoScope)
GameItemManager.destroyItem(itemPtr);
else
unequipCharacter(childSrc->getInventoryId(), itemPtr->getRefInventorySlot());
}
}
}
}
} }
else if (_PowoCell == 0) else if (_PowoCell == 0)
CBuildingManager::getInstance()->removePlayerFromRoom(this); CBuildingManager::getInstance()->removePlayerFromRoom(this);
@ -21313,7 +21332,6 @@ uint32 CPetAnimal::getAnimalMaxBulk()
if (formBag) if (formBag)
{ {
// zig inventories have bulk proportionnal to size (size is 1->250)
if (creatureBagSheet == CSheetId("zig_inventory.sitem")) if (creatureBagSheet == CSheetId("zig_inventory.sitem"))
return formBag->BulkMax*1.5; return formBag->BulkMax*1.5;
return formBag->BulkMax; return formBag->BulkMax;

@ -4099,6 +4099,7 @@ private:
bool _PowoCanTeleport; bool _PowoCanTeleport;
bool _PowoCanSpeedUp; bool _PowoCanSpeedUp;
bool _PowoCanDP; bool _PowoCanDP;
bool _PowoCanRetry;
bool _PowoCanAccesRoomInv; bool _PowoCanAccesRoomInv;
bool _PowoCanAccessGuildInv; bool _PowoCanAccessGuildInv;
@ -4160,7 +4161,7 @@ public:
if (flag == "xp") if (flag == "xp")
return _PowoCanXP; return _PowoCanXP;
if (flag == "dead") if (flag == "nodead")
return _PowoCantDead; return _PowoCantDead;
if (flag == "teleport") if (flag == "teleport")
@ -4172,6 +4173,9 @@ public:
if (flag == "dp") if (flag == "dp")
return _PowoCanDP; return _PowoCanDP;
if (flag == "retry")
return _PowoCanRetry;
if (flag == "guild_inv") if (flag == "guild_inv")
return _PowoCanAccessGuildInv; return _PowoCanAccessGuildInv;
@ -4186,7 +4190,7 @@ public:
if (flag == "xp") if (flag == "xp")
_PowoCanXP = value; _PowoCanXP = value;
else if (flag == "dead") else if (flag == "nodead")
_PowoCantDead = value; _PowoCantDead = value;
else if (flag == "teleport") else if (flag == "teleport")
@ -4198,6 +4202,9 @@ public:
else if (flag == "dp") else if (flag == "dp")
_PowoCanDP = value; _PowoCanDP = value;
else if (flag == "retry")
_PowoCanRetry = value;
else if (flag == "guild_inv") else if (flag == "guild_inv")
_PowoCanAccessGuildInv = value; _PowoCanAccessGuildInv = value;
@ -4214,6 +4221,7 @@ public:
_PowoCanTeleport = false; _PowoCanTeleport = false;
_PowoCanSpeedUp = false; _PowoCanSpeedUp = false;
_PowoCanDP = false; _PowoCanDP = false;
_PowoCanRetry = true;
} }
void resetTodayGuildPoints() void resetTodayGuildPoints()

@ -1388,6 +1388,7 @@ private:
PROP2(_CreatorId, CEntityId, _CreatorId, _CreatorId=val)\ PROP2(_CreatorId, CEntityId, _CreatorId, _CreatorId=val)\
PROP2(_PhraseId, string, _PhraseId, _PhraseId=val)\ PROP2(_PhraseId, string, _PhraseId, _PhraseId=val)\
PROP2(_RequiredFaction, string, _RequiredFaction, _RequiredFaction=val)\ PROP2(_RequiredFaction, string, _RequiredFaction, _RequiredFaction=val)\
PROP2(_RequiredPowo, string, _RequiredPowo, _RequiredPowo=val)\
LSTRUCT2(_CraftParameters, if (_CraftParameters != NULL), _CraftParameters->store(pdr), _CraftParameters = new CItemCraftParameters; _CraftParameters->apply(pdr))\ LSTRUCT2(_CraftParameters, if (_CraftParameters != NULL), _CraftParameters->store(pdr), _CraftParameters = new CItemCraftParameters; _CraftParameters->apply(pdr))\
LPROP2(_SlotImage, uint16, if (0), 0xffff, slotImage=val)\ LPROP2(_SlotImage, uint16, if (0), 0xffff, slotImage=val)\
LPROP2(_SapLoad, uint32, if (_SapLoad!=0), _SapLoad, _SapLoad=val)\ LPROP2(_SapLoad, uint32, if (_SapLoad!=0), _SapLoad, _SapLoad=val)\

Loading…
Cancel
Save