mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
Compare commits
1 Commits
f9643939d9
...
19b85b1f12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b85b1f12 |
@ -38,9 +38,7 @@
|
||||
#include <common/MD5.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
int32_t CGlueMgr::m_acceptedContest = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedScanning = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||
int32_t CGlueMgr::m_accountMsgAvailable;
|
||||
|
||||
@ -32,9 +32,7 @@ class CGlueMgr {
|
||||
};
|
||||
|
||||
// Static variables
|
||||
static int32_t m_acceptedContest;
|
||||
static int32_t m_acceptedEULA;
|
||||
static int32_t m_acceptedScanning;
|
||||
static int32_t m_acceptedTerminationWithoutNotice;
|
||||
static int32_t m_acceptedTOS;
|
||||
static int32_t m_accountMsgAvailable;
|
||||
|
||||
@ -222,13 +222,7 @@ int32_t Script_ShowScanningNotice(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_ScanningAccepted(lua_State* L) {
|
||||
if (CGlueMgr::m_acceptedScanning) {
|
||||
lua_pushnumber(L, 1.0);
|
||||
} else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
return 1;
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_AcceptScanning(lua_State* L) {
|
||||
@ -240,13 +234,7 @@ int32_t Script_ShowContestNotice(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_ContestAccepted(lua_State* L) {
|
||||
if (CGlueMgr::m_acceptedContest) {
|
||||
lua_pushnumber(L, 1.0);
|
||||
} else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
return 1;
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_AcceptContest(lua_State* L) {
|
||||
|
||||
@ -96,11 +96,7 @@ const char* CGUnit_C::GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, U
|
||||
return raceRec->m_name;
|
||||
}
|
||||
|
||||
CGUnit_C::CGUnit_C(uint32_t time, CClientObjCreate& objCreate)
|
||||
: CGObject_C(time, objCreate)
|
||||
, m_movement(&this->m_localMovement)
|
||||
, m_localMovement(objCreate.move.status.position28, objCreate.move.status.facing34, this->GetGUID(), this)
|
||||
{
|
||||
CGUnit_C::CGUnit_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) {
|
||||
// TODO
|
||||
|
||||
this->RefreshDataPointers();
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include "object/client/CClientObjCreate.hpp"
|
||||
#include "object/client/CGObject_C.hpp"
|
||||
#include "object/client/CGUnit.hpp"
|
||||
#include "object/client/CMovementData_C.hpp"
|
||||
#include "object/Types.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
|
||||
@ -49,9 +48,6 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
||||
|
||||
private:
|
||||
// Private member variables
|
||||
CMovementData_C* m_movement;
|
||||
// TODO
|
||||
CMovementData_C m_localMovement;
|
||||
// TODO
|
||||
CreatureDisplayInfoRec* m_displayInfo;
|
||||
CreatureDisplayInfoExtraRec* m_displayInfoExtra;
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
#include "object/client/CMovementData_C.hpp"
|
||||
|
||||
CMovementData_C::CMovementData_C(const C3Vector& position, float facing, const WOWGUID& guid, CGUnit_C* unit)
|
||||
: CMovementShared(0, position, facing, guid)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
#ifndef OBJECT_CLIENT_C_MOVEMENT_DATA_C_HPP
|
||||
#define OBJECT_CLIENT_C_MOVEMENT_DATA_C_HPP
|
||||
|
||||
#include "object/movement/CMovementShared.hpp"
|
||||
|
||||
class CGUnit_C;
|
||||
|
||||
class CMovementData_C : public CMovementShared {
|
||||
public:
|
||||
// Public member functions
|
||||
CMovementData_C(const C3Vector& position, float facing, const WOWGUID& guid, CGUnit_C* unit);
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,15 +0,0 @@
|
||||
#ifndef OBJECT_CLIENT_C_MOVEMENT_C_HPP
|
||||
#define OBJECT_CLIENT_C_MOVEMENT_C_HPP
|
||||
|
||||
#include "object/client/CMovementData_C.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
class CMovement_C : public CMovementData_C {
|
||||
public:
|
||||
// Public member functions
|
||||
CMovement_C(const C3Vector& position, float facing, const WOWGUID& guid, CGUnit_C* unit)
|
||||
: CMovementData_C(position, facing, guid, unit) {};
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,15 +0,0 @@
|
||||
#include "object/movement/CMovementShared.hpp"
|
||||
|
||||
CMovementShared::CMovementShared(const WOWGUID& transportGUID, const C3Vector& position, float facing, const WOWGUID& guid)
|
||||
: CPassenger(transportGUID, position, guid)
|
||||
{
|
||||
this->m_facing = facing;
|
||||
|
||||
this->m_anchorPosition = position;
|
||||
this->m_anchorFacing = facing;
|
||||
this->m_anchorPitch = 0.0f;
|
||||
this->m_cosAnchorPitch = 1.0f;
|
||||
this->m_sinAnchorPitch = 0.0f;
|
||||
|
||||
this->m_spline = nullptr;
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
#ifndef OBJECT_MOVEMENT_C_MOVEMENT_SHARED_HPP
|
||||
#define OBJECT_MOVEMENT_C_MOVEMENT_SHARED_HPP
|
||||
|
||||
#include "object/movement/CPassenger.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
struct CMoveSpline;
|
||||
|
||||
class CMovementShared : public CPassenger {
|
||||
public:
|
||||
// Public member functions
|
||||
CMovementShared(const WOWGUID& transportGUID, const C3Vector& position, float facing, const WOWGUID& guid);
|
||||
|
||||
protected:
|
||||
// Protected member variables
|
||||
// TODO
|
||||
C3Vector m_anchorPosition;
|
||||
float m_anchorFacing;
|
||||
float m_anchorPitch;
|
||||
// TODO
|
||||
C3Vector m_direction;
|
||||
C2Vector m_direction2d;
|
||||
float m_cosAnchorPitch;
|
||||
float m_sinAnchorPitch;
|
||||
// TODO
|
||||
CMoveSpline* m_spline;
|
||||
// TODO
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -48,7 +48,7 @@ CDataStore& operator>>(CDataStore& msg, CMovementStatus& move) {
|
||||
msg.Get(move.uint14);
|
||||
msg.Get(move.uint0);
|
||||
|
||||
msg >> move.position28;
|
||||
msg >> move.position18;
|
||||
msg.Get(move.facing34);
|
||||
|
||||
if (move.moveFlags & 0x200) {
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
#include "object/movement/CPassenger.hpp"
|
||||
#include <tempest/Matrix.hpp>
|
||||
|
||||
C3Vector CPassenger::GetPosition() const {
|
||||
return GetPosition(this->m_position);
|
||||
}
|
||||
|
||||
C3Vector CPassenger::GetPosition(const C3Vector& position) const {
|
||||
// If on transport, transform position by transport matrix
|
||||
if (this->m_transportGUID) {
|
||||
C44Matrix transportMatrix;
|
||||
// MovementGetTransportMtxX(this->m_transportGUID, &transportMatrix);
|
||||
|
||||
return position * transportMatrix;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
#ifndef OBJECT_MOVEMENT_C_PASSENGER_HPP
|
||||
#define OBJECT_MOVEMENT_C_PASSENGER_HPP
|
||||
|
||||
#include "util/GUID.hpp"
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
class CPassenger {
|
||||
public:
|
||||
// Public member functions
|
||||
CPassenger(const WOWGUID& transportGUID, const C3Vector& position, const WOWGUID& guid)
|
||||
: m_transportGUID(transportGUID)
|
||||
, m_position(position)
|
||||
, m_facing(0.0f)
|
||||
, m_guid(guid) {};
|
||||
C3Vector GetPosition() const;
|
||||
C3Vector GetPosition(const C3Vector& position) const;
|
||||
|
||||
protected:
|
||||
// Protected member variables
|
||||
// TODO
|
||||
WOWGUID m_transportGUID;
|
||||
C3Vector m_position;
|
||||
// TODO
|
||||
float m_facing;
|
||||
// TODO
|
||||
const WOWGUID& m_guid;
|
||||
// TODO
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user