mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10599] Attempt fix data corruption for some localization structures with GCC use.
By unknown reason GCC generate wrong code for locale structures declared in header after pack pragma. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
ba3578107a
commit
0205adfde1
4 changed files with 23 additions and 19 deletions
|
|
@ -516,6 +516,13 @@ struct GameObjectInfo
|
|||
}
|
||||
};
|
||||
|
||||
// By unknown reason GCC generate wrong code for locale structures declared in header after pack pragma
|
||||
struct GameObjectLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> CastBarCaption;
|
||||
};
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||
#if defined( __GNUC__ )
|
||||
#pragma pack()
|
||||
|
|
@ -523,12 +530,6 @@ struct GameObjectInfo
|
|||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
struct GameObjectLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> CastBarCaption;
|
||||
};
|
||||
|
||||
// client side GO show states
|
||||
enum GOState
|
||||
{
|
||||
|
|
|
|||
|
|
@ -656,6 +656,7 @@ struct ItemPrototype
|
|||
bool IsConjuredConsumable() const { return Class == ITEM_CLASS_CONSUMABLE && (Flags & ITEM_FLAGS_CONJURED); }
|
||||
};
|
||||
|
||||
// By unknown reason GCC generate wrong code for locale structures declared in header after pack pragma
|
||||
struct ItemLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,20 @@ struct PageText
|
|||
uint32 Next_Page;
|
||||
};
|
||||
|
||||
// By unknown reason GCC generate wrong code for locale structures declared in header after pack pragma
|
||||
struct PageTextLocale
|
||||
{
|
||||
std::vector<std::string> Text;
|
||||
};
|
||||
|
||||
struct NpcTextLocale
|
||||
{
|
||||
NpcTextLocale() { Text_0.resize(8); Text_1.resize(8); }
|
||||
|
||||
std::vector<std::vector<std::string> > Text_0;
|
||||
std::vector<std::vector<std::string> > Text_1;
|
||||
};
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||
#if defined( __GNUC__ )
|
||||
#pragma pack()
|
||||
|
|
@ -61,16 +75,4 @@ struct GossipText
|
|||
GossipTextOption Options[8];
|
||||
};
|
||||
|
||||
struct PageTextLocale
|
||||
{
|
||||
std::vector<std::string> Text;
|
||||
};
|
||||
|
||||
struct NpcTextLocale
|
||||
{
|
||||
NpcTextLocale() { Text_0.resize(8); Text_1.resize(8); }
|
||||
|
||||
std::vector<std::vector<std::string> > Text_0;
|
||||
std::vector<std::vector<std::string> > Text_1;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10598"
|
||||
#define REVISION_NR "10599"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue