Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
BattlePetPvpState.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef BATTLE_PET_PVP_STATE_H
7#define BATTLE_PET_PVP_STATE_H
8
9#include "Common.h"
10#include "G3D/Vector3.h"
11
12#include <ctime>
13#include <map>
14#include <vector>
15
17{
19 bool Accepted = false;
20 time_t CreatedAt = 0;
21};
22
24{
27 G3D::Vector3 Origin;
28 G3D::Vector3 Positions[2];
29 float Orientation = 0.0f;
31 bool HasLocationResult = false;
32 bool PromptAcknowledged = false;
33 time_t CreatedAt = 0;
34};
35
37{
38public:
39 typedef std::vector<uint64> QueueContainer;
40 typedef std::map<uint64, PetBattlePvpProposal> ProposalMap;
41 typedef std::map<uint64, PetBattlePvpChallenge> ChallengeMap;
42 typedef std::map<uint64, uint64> ChallengeTargetMap;
43
48
49 void RemoveQueueEntry(uint64 playerGuid);
50 void AddQueueEntry(uint64 playerGuid);
51 void AddProposalPair(uint64 playerGuid, uint64 opponentGuid, time_t createdAt);
52 void ClearProposal(uint64 playerGuid);
53 void AddChallenge(PetBattlePvpChallenge const& challenge);
54 void EraseChallengeForTarget(uint64 targetGuid);
55 ChallengeMap::iterator FindChallengeForPlayer(uint64 playerGuid);
56
57private:
62};
63
65
66#endif
PetBattlePvpStateStore & GetPetBattlePvpStateStore()
std::uint32_t uint32
Definition Define.h:77
std::uint64_t uint64
Definition Define.h:76
void ClearProposal(uint64 playerGuid)
std::map< uint64, PetBattlePvpProposal > ProposalMap
ChallengeMap::iterator FindChallengeForPlayer(uint64 playerGuid)
void EraseChallengeForTarget(uint64 targetGuid)
void AddQueueEntry(uint64 playerGuid)
void AddProposalPair(uint64 playerGuid, uint64 opponentGuid, time_t createdAt)
std::map< uint64, uint64 > ChallengeTargetMap
std::map< uint64, PetBattlePvpChallenge > ChallengeMap
void AddChallenge(PetBattlePvpChallenge const &challenge)
ChallengeTargetMap & ChallengeTargetByChallenger()
void RemoveQueueEntry(uint64 playerGuid)
ChallengeMap & ChallengesByTarget()
ChallengeTargetMap _challengeTargetByChallenger
std::vector< uint64 > QueueContainer
QueueContainer & Queue()
G3D::Vector3 Positions[2]