mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 12:34:55 +02:00
Some minor changes/additions.
This commit is contained in:
@@ -409,8 +409,7 @@ namespace Otc
|
||||
PathFindAllowNonWalkable = 8
|
||||
};
|
||||
|
||||
enum AutomapFlags
|
||||
{
|
||||
enum AutomapFlags {
|
||||
MapMarkTick = 0,
|
||||
MapMarkQuestion,
|
||||
MapMarkExclamation,
|
||||
@@ -433,20 +432,24 @@ namespace Otc
|
||||
MapMarkGreenSouth
|
||||
};
|
||||
|
||||
enum VipState
|
||||
{
|
||||
enum VipState {
|
||||
VipStateOffline = 0,
|
||||
VipStateOnline = 1,
|
||||
VipStatePending = 2
|
||||
};
|
||||
|
||||
enum SpeedFormula
|
||||
{
|
||||
enum SpeedFormula {
|
||||
SpeedFormulaA = 0,
|
||||
SpeedFormulaB,
|
||||
SpeedFormulaC,
|
||||
LastSpeedFormula
|
||||
};
|
||||
|
||||
enum AnimationPhase {
|
||||
PhaseAutomatic = 0,
|
||||
PhaseRandom = 254,
|
||||
PhaseAsync = 255
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
int getNumPatternY() { return rawGetThingType()->getNumPatternY(); }
|
||||
int getNumPatternZ() { return rawGetThingType()->getNumPatternZ(); }
|
||||
int getAnimationPhases() { return rawGetThingType()->getAnimationPhases(); }
|
||||
Animation getAnimation() { return rawGetThingType()->getAnimation(); }
|
||||
int getGroundSpeed() { return rawGetThingType()->getGroundSpeed(); }
|
||||
int getMaxTextLength() { return rawGetThingType()->getMaxTextLength(); }
|
||||
Light getLight() { return rawGetThingType()->getLight(); }
|
||||
|
@@ -117,6 +117,12 @@ struct Animation {
|
||||
int loopCount;
|
||||
bool async;
|
||||
std::vector<std::tuple<int, int> > frames;
|
||||
|
||||
float duration(uint8 frame) {
|
||||
assert(frames.size() <= frame);
|
||||
std::tuple<int, int> data = frames.at(frame);
|
||||
return stdext::random_range((long)std::get<0>(data), (long)std::get<1>(data));
|
||||
}
|
||||
};
|
||||
|
||||
class ThingType : public LuaObject
|
||||
|
Reference in New Issue
Block a user