Browse Source

Enable protocol 10.75

TheSumm 6 years ago
parent
commit
cbf70c1d63
4 changed files with 103 additions and 3 deletions
  1. 1
    1
      modules/gamelib/game.lua
  2. 2
    2
      src/client/game.cpp
  3. 40
    0
      src/client/thingtypeanimator.cpp
  4. 60
    0
      src/client/thingtypeanimator.h

+ 1
- 1
modules/gamelib/game.lua View File

@@ -73,7 +73,7 @@ function g_game.getSupportedClients()
73 73
     1053, 1054, 1055, 1056, 1057,
74 74
     1058, 1059, 1060, 1061, 1062,
75 75
     1063, 1064, 1070, 1071, 1072,
76
-    1073, 1074
76
+    1073, 1074, 1075
77 77
   }
78 78
 end
79 79
 

+ 2
- 2
src/client/game.cpp View File

@@ -1450,7 +1450,7 @@ void Game::setProtocolVersion(int version)
1450 1450
     if(isOnline())
1451 1451
         stdext::throw_exception("Unable to change protocol version while online");
1452 1452
 
1453
-    if(version != 0 && (version < 740 || version > 1074))
1453
+    if(version != 0 && (version < 740 || version > 1075))
1454 1454
         stdext::throw_exception(stdext::format("Protocol version %d not supported", version));
1455 1455
 
1456 1456
     m_protocolVersion = version;
@@ -1468,7 +1468,7 @@ void Game::setClientVersion(int version)
1468 1468
     if(isOnline())
1469 1469
         stdext::throw_exception("Unable to change client version while online");
1470 1470
 
1471
-    if(version != 0 && (version < 740 || version > 1074))
1471
+    if(version != 0 && (version < 740 || version > 1075))
1472 1472
         stdext::throw_exception(stdext::format("Client version %d not supported", version));
1473 1473
 
1474 1474
     m_features.reset();

+ 40
- 0
src/client/thingtypeanimator.cpp View File

@@ -0,0 +1,40 @@
1
+/*
2
+ * Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient>
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ * THE SOFTWARE.
21
+ */
22
+
23
+#include "thingtypeanimator.h"
24
+#include "spritemanager.h"
25
+#include "game.h"
26
+#include "lightview.h"
27
+
28
+#include <framework/graphics/graphics.h>
29
+#include <framework/graphics/texture.h>
30
+#include <framework/graphics/image.h>
31
+#include <framework/graphics/texturemanager.h>
32
+#include <framework/core/filestream.h>
33
+#include <framework/otml/otml.h>
34
+
35
+ThingTypeAnimator::ThingTypeAnimator(int id, ThingCategory category)
36
+{
37
+    m_category = category;
38
+    m_id = id;
39
+
40
+}

+ 60
- 0
src/client/thingtypeanimator.h View File

@@ -0,0 +1,60 @@
1
+/*
2
+ * Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient>
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ * THE SOFTWARE.
21
+ */
22
+
23
+#ifndef THINGTYPEANIMATOR_H
24
+#define THINGTYPEANIMATOR_H
25
+
26
+#include "declarations.h"
27
+
28
+#include <framework/core/declarations.h>
29
+#include <framework/otml/declarations.h>
30
+#include <framework/graphics/texture.h>
31
+#include <framework/graphics/coordsbuffer.h>
32
+#include <framework/luaengine/luaobject.h>
33
+#include <framework/net/server.h>
34
+
35
+enum FrameDurations {
36
+	FRAME_DURATION_ITEM = 500,
37
+	FRAME_DURATION_OUTFIT = 300,
38
+	FRAME_DURATION_EFFECT = 75
39
+};
40
+
41
+class ThingTypeAnimator : public LuaObject
42
+{
43
+public:
44
+	ThingTypeAnimator(int id, ThingCategory category);
45
+
46
+private:
47
+    int m_lastPhase;
48
+	int m_currentPhase;
49
+	int m_startingPhase;
50
+	int m_loopCount;
51
+
52
+	int m_phases;
53
+	int m_timer;
54
+
55
+	int m_id;
56
+	ThingCategory m_category;
57
+
58
+};
59
+
60
+#endif

Loading…
Cancel
Save