Merge branch 'master' into resend

This commit is contained in:
KimLS
2019-01-03 18:33:55 -08:00
45 changed files with 1725 additions and 1062 deletions
+24 -10
View File
@@ -1408,25 +1408,39 @@ uint8 Database::GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16
return base_cap;
}
uint32 Database::GetCharacterInfo(const char* iName, uint32* oAccID, uint32* oZoneID, uint32* oInstanceID, float* oX, float* oY, float* oZ) {
std::string query = StringFormat("SELECT `id`, `account_id`, `zone_id`, `zone_instance`, `x`, `y`, `z` FROM `character_data` WHERE `name` = '%s'", iName);
uint32 Database::GetCharacterInfo(
const char *iName,
uint32 *oAccID,
uint32 *oZoneID,
uint32 *oInstanceID,
float *oX,
float *oY,
float *oZ
)
{
std::string query = StringFormat(
"SELECT `id`, `account_id`, `zone_id`, `zone_instance`, `x`, `y`, `z` FROM `character_data` WHERE `name` = '%s'",
EscapeString(iName).c_str()
);
auto results = QueryDatabase(query);
if (!results.Success()) {
return 0;
}
if (results.RowCount() != 1)
if (results.RowCount() != 1) {
return 0;
}
auto row = results.begin();
auto row = results.begin();
uint32 charid = atoi(row[0]);
if (oAccID){ *oAccID = atoi(row[1]); }
if (oZoneID){ *oZoneID = atoi(row[2]); }
if (oInstanceID){ *oInstanceID = atoi(row[3]); }
if (oX){ *oX = atof(row[4]); }
if (oY){ *oY = atof(row[5]); }
if (oZ){ *oZ = atof(row[6]); }
if (oAccID) { *oAccID = atoi(row[1]); }
if (oZoneID) { *oZoneID = atoi(row[2]); }
if (oInstanceID) { *oInstanceID = atoi(row[3]); }
if (oX) { *oX = atof(row[4]); }
if (oY) { *oY = atof(row[5]); }
if (oZ) { *oZ = atof(row[6]); }
return charid;
}
+8 -8
View File
@@ -1184,15 +1184,15 @@ struct SpecialMesg_Struct
** When somebody changes what they're wearing or give a pet a weapon (model changes)
** Length: 19 Bytes
*/
struct WearChange_Struct{
/*000*/ uint16 spawn_id;
/*002*/ uint32 material;
/*006*/ uint32 unknown06;
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ uint32 hero_forge_model; // New to VoA
/*018*/ uint32 unknown18; // New to RoF
struct WearChange_Struct {
/*000*/ uint16 spawn_id;
/*002*/ uint32 material;
/*006*/ uint32 unknown06;
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ uint32 hero_forge_model; // New to VoA
/*018*/ uint32 unknown18; // New to RoF
/*022*/ EQEmu::textures::Tint_Struct color;
/*026*/ uint8 wear_slot_id;
/*026*/ uint8 wear_slot_id;
/*027*/
};
+3 -1
View File
@@ -93,6 +93,7 @@ namespace Logs {
Traps,
NPCRoamBox,
NPCScaling,
MobAppearance,
MaxCategoryID /* Don't Remove this */
};
@@ -151,7 +152,8 @@ namespace Logs {
"Food",
"Traps",
"NPC Roam Box",
"NPC Scaling"
"NPC Scaling",
"Mob Appearance"
};
}
+4
View File
@@ -84,6 +84,7 @@ EQEmu::ItemInstance::ItemInstance(const ItemData* item, int16 charges) {
m_ornamentidfile = 0;
m_ornament_hero_model = 0;
m_recast_timestamp = 0;
m_new_id_file = 0;
}
EQEmu::ItemInstance::ItemInstance(SharedDatabase *db, uint32 item_id, int16 charges) {
@@ -117,6 +118,7 @@ EQEmu::ItemInstance::ItemInstance(SharedDatabase *db, uint32 item_id, int16 char
m_ornamentidfile = 0;
m_ornament_hero_model = 0;
m_recast_timestamp = 0;
m_new_id_file = 0;
}
EQEmu::ItemInstance::ItemInstance(ItemInstTypes use_type) {
@@ -138,6 +140,7 @@ EQEmu::ItemInstance::ItemInstance(ItemInstTypes use_type) {
m_ornamentidfile = 0;
m_ornament_hero_model = 0;
m_recast_timestamp = 0;
m_new_id_file = 0;
}
// Make a copy of an EQEmu::ItemInstance object
@@ -195,6 +198,7 @@ EQEmu::ItemInstance::ItemInstance(const ItemInstance& copy)
m_ornamentidfile = copy.m_ornamentidfile;
m_ornament_hero_model = copy.m_ornament_hero_model;
m_recast_timestamp = copy.m_recast_timestamp;
m_new_id_file = copy.m_new_id_file;
}
// Clean up container contents
+3
View File
@@ -203,6 +203,8 @@ namespace EQEmu
void SetOrnamentIcon(uint32 ornament_icon) { m_ornamenticon = ornament_icon; }
uint32 GetOrnamentationIDFile() const { return m_ornamentidfile; }
void SetOrnamentationIDFile(uint32 ornament_idfile) { m_ornamentidfile = ornament_idfile; }
uint32 GetNewIDFile() const { return m_new_id_file; }
void SetNewIDFile(uint32 new_id_file) { m_new_id_file = new_id_file; }
uint32 GetOrnamentHeroModel(int32 material_slot = -1) const;
void SetOrnamentHeroModel(uint32 ornament_hero_model) { m_ornament_hero_model = ornament_hero_model; }
uint32 GetRecastTimestamp() const { return m_recast_timestamp; }
@@ -306,6 +308,7 @@ namespace EQEmu
bool m_scaling;
uint32 m_ornamenticon;
uint32 m_ornamentidfile;
uint32 m_new_id_file;
uint32 m_ornament_hero_model;
uint32 m_recast_timestamp;
+13 -10
View File
@@ -5146,16 +5146,19 @@ namespace RoF
ob.write((const char*)&evotop, sizeof(RoF::structs::EvolvingItem));
}
//ORNAMENT IDFILE / ICON
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
uint32 ornaIcon = 0;
uint32 heroModel = 0;
/**
* Ornamentation
*/
int ornamentation_augment_type = RuleI(Character, OrnamentationAugmentType);
uint32 ornamentation_icon = (inst->GetOrnamentationIcon() ? inst->GetOrnamentationIcon() : 0);
uint32 hero_model = 0;
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
ornaIcon = inst->GetOrnamentationIcon();
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
if (inst->GetOrnamentationIDFile()) {
hero_model = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
char tmp[30];
memset(tmp, 0x0, 30);
sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
//Mainhand
ob.write(tmp, strlen(tmp));
@@ -5172,9 +5175,9 @@ namespace RoF
RoF::structs::ItemSerializationHeaderFinish hdrf;
hdrf.ornamentIcon = ornaIcon;
hdrf.ornamentIcon = ornamentation_icon;
hdrf.unknowna1 = 0xffffffff;
hdrf.ornamentHeroModel = heroModel;
hdrf.ornamentHeroModel = hero_model;
hdrf.unknown063 = 0;
hdrf.unknowna3 = 0;
hdrf.unknowna4 = 0xffffffff;
+13 -10
View File
@@ -5443,16 +5443,19 @@ namespace RoF2
ob.write((const char*)&evotop, sizeof(RoF2::structs::EvolvingItem));
}
//ORNAMENT IDFILE / ICON
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
uint32 ornaIcon = 0;
uint32 heroModel = 0;
/**
* Ornamentation
*/
int ornamentation_augment_type = RuleI(Character, OrnamentationAugmentType);
uint32 ornamentation_icon = (inst->GetOrnamentationIcon() ? inst->GetOrnamentationIcon() : 0);
uint32 hero_model = 0;
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
ornaIcon = inst->GetOrnamentationIcon();
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
if (inst->GetOrnamentationIDFile()) {
hero_model = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
char tmp[30];
memset(tmp, 0x0, 30);
sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
//Mainhand
ob.write(tmp, strlen(tmp));
@@ -5469,9 +5472,9 @@ namespace RoF2
RoF2::structs::ItemSerializationHeaderFinish hdrf;
hdrf.ornamentIcon = ornaIcon;
hdrf.ornamentIcon = ornamentation_icon;
hdrf.unknowna1 = 0xffffffff;
hdrf.ornamentHeroModel = heroModel;
hdrf.ornamentHeroModel = hero_model;
hdrf.unknown063 = 0;
hdrf.Copied = 0;
hdrf.unknowna4 = 0xffffffff;
+2 -2
View File
@@ -1125,10 +1125,10 @@ bool IsStackableDot(uint16 spell_id)
bool IsBardOnlyStackEffect(int effect)
{
switch(effect) {
case SE_CurrentMana:
/*case SE_CurrentMana:
case SE_ManaRegen_v2:
case SE_CurrentHP:
case SE_HealOverTime:
case SE_HealOverTime:*/
case SE_BardAEDot:
return true;
default:
+23
View File
@@ -65,6 +65,12 @@ namespace EQEmu
uint32 Unknown2; // same as material?
};
struct InternalTexture_Struct {
uint32 HerosForgeModel;
uint32 Material;
uint32 Color;
};
struct TextureMaterial_Struct {
uint32 Material;
};
@@ -100,6 +106,23 @@ namespace EQEmu
};
};
struct InternalTextureProfile {
union {
struct {
textures::InternalTexture_Struct Head;
textures::InternalTexture_Struct Chest;
textures::InternalTexture_Struct Arms;
textures::InternalTexture_Struct Wrist;
textures::InternalTexture_Struct Hands;
textures::InternalTexture_Struct Legs;
textures::InternalTexture_Struct Feet;
textures::InternalTexture_Struct Primary;
textures::InternalTexture_Struct Secondary;
};
textures::InternalTexture_Struct Slot[textures::materialCount];
};
};
struct TextureMaterialProfile {
union {
struct {