mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-01-12 14:52:39 +00:00
tests
This commit is contained in:
@@ -26,6 +26,24 @@ struct BuffParameter {
|
||||
* Meta information about a buff that can be applied, e.g. how long it's applied, who applied it, etc.
|
||||
*/
|
||||
struct Buff {
|
||||
bool operator==(const Buff& other) const {
|
||||
return id == other.id &&
|
||||
time == other.time &&
|
||||
tick == other.tick &&
|
||||
tickTime == other.tickTime &&
|
||||
stacks == other.stacks &&
|
||||
source == other.source &&
|
||||
behaviorID == other.behaviorID &&
|
||||
cancelOnDamaged == other.cancelOnDamaged &&
|
||||
cancelOnDeath == other.cancelOnDeath &&
|
||||
cancelOnLogout == other.cancelOnLogout &&
|
||||
cancelOnRemoveBuff == other.cancelOnRemoveBuff &&
|
||||
cancelOnUi == other.cancelOnUi &&
|
||||
cancelOnUnequip == other.cancelOnUnequip &&
|
||||
cancelOnZone == other.cancelOnZone &&
|
||||
applyOnTeammates == other.applyOnTeammates &&
|
||||
refCount == other.refCount;
|
||||
}
|
||||
int32_t id = 0;
|
||||
float time = 0;
|
||||
float tick = 0;
|
||||
@@ -134,6 +152,9 @@ public:
|
||||
*/
|
||||
const std::vector<BuffParameter>& GetBuffParameters(int32_t buffId);
|
||||
|
||||
const std::map<int32_t, Buff>& GetBuffs() const { return m_Buffs; }
|
||||
const std::set<int32_t>& GetBuffsToRemove() const { return m_BuffsToRemove; }
|
||||
|
||||
private:
|
||||
/**
|
||||
* The currently active buffs
|
||||
|
||||
@@ -331,10 +331,12 @@ void CharacterComponent::UpdateXml(tinyxml2::XMLDocument& doc) {
|
||||
if (m_ClaimCodes[2] != 0) character->SetAttribute("co2", m_ClaimCodes[2]);
|
||||
if (m_ClaimCodes[3] != 0) character->SetAttribute("co3", m_ClaimCodes[3]);
|
||||
|
||||
// Tests have been written up to here
|
||||
|
||||
character->SetAttribute("ls", m_Uscore);
|
||||
// Custom attribute to keep track of reputation.
|
||||
character->SetAttribute("rpt", GetReputation());
|
||||
character->SetAttribute("stt", StatisticsToString().c_str());
|
||||
character->SetAttribute("stt", StatisticsToString().c_str()); // and also this already tested :)
|
||||
|
||||
// Set the zone statistics of the form <zs><s/> ... <s/></zs>
|
||||
auto zoneStatistics = character->FirstChildElement("zs");
|
||||
|
||||
@@ -307,6 +307,8 @@ public:
|
||||
|
||||
void SetDroppedCoins(const uint64_t value) { m_DroppedCoins = value; };
|
||||
|
||||
const std::array<uint64_t, 4>& GetClaimCodes() const { return m_ClaimCodes; };
|
||||
|
||||
/**
|
||||
* Character info regarding this character, including clothing styles, etc.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user