|
@@ -881,7 +881,7 @@ void WorldDatabase::LoadNPCs(ZoneServer* zone){
|
|
|
NPC* npc = 0;
|
|
|
int32 id = 0;
|
|
|
int32 total = 0;
|
|
|
- MYSQL_RES* result = query.RunQuery2(Q_SELECT,"SELECT npc.spawn_id, s.name, npc.min_level, npc.max_level, npc.enc_level, s.race, s.model_type, npc.class_, npc.gender, s.command_primary, s.command_secondary, s.show_name, npc.min_group_size, npc.max_group_size, npc.hair_type_id, npc.facial_hair_type_id, npc.wing_type_id, npc.chest_type_id, npc.legs_type_id, npc.soga_hair_type_id, npc.soga_facial_hair_type_id, s.attackable, s.show_level, s.targetable, s.show_command_icon, s.display_hand_icon, s.hp, s.power, s.size, s.collision_radius, npc.action_state, s.visual_state, npc.mood_state, npc.initial_state, npc.activity_status, s.faction_id, s.sub_title, s.merchant_id, s.merchant_type, s.size_offset, npc.attack_type, npc.ai_strategy+0, npc.spell_list_id, npc.secondary_spell_list_id, npc.skill_list_id, npc.secondary_skill_list_id, npc.equipment_list_id, npc.str, npc.sta, npc.wis, npc.intel, npc.agi, npc.heat, npc.cold, npc.magic, npc.mental, npc.divine, npc.disease, npc.poison, npc.aggro_radius, npc.cast_percentage, npc.randomize, npc.soga_model_type, npc.heroic_flag, npc.alignment, npc.elemental, npc.arcane, npc.noxious, s.savagery, s.dissonance, npc.hide_hood, npc.emote_state, s.prefix, s.suffix, s.last_name, s.expansion_flag\n"
|
|
|
+ MYSQL_RES* result = query.RunQuery2(Q_SELECT,"SELECT npc.spawn_id, s.name, npc.min_level, npc.max_level, npc.enc_level, s.race, s.model_type, npc.class_, npc.gender, s.command_primary, s.command_secondary, s.show_name, npc.min_group_size, npc.max_group_size, npc.hair_type_id, npc.facial_hair_type_id, npc.wing_type_id, npc.chest_type_id, npc.legs_type_id, npc.soga_hair_type_id, npc.soga_facial_hair_type_id, s.attackable, s.show_level, s.targetable, s.show_command_icon, s.display_hand_icon, s.hp, s.power, s.size, s.collision_radius, npc.action_state, s.visual_state, npc.mood_state, npc.initial_state, npc.activity_status, s.faction_id, s.sub_title, s.merchant_id, s.merchant_type, s.size_offset, npc.attack_type, npc.ai_strategy+0, npc.spell_list_id, npc.secondary_spell_list_id, npc.skill_list_id, npc.secondary_skill_list_id, npc.equipment_list_id, npc.str, npc.sta, npc.wis, npc.intel, npc.agi, npc.heat, npc.cold, npc.magic, npc.mental, npc.divine, npc.disease, npc.poison, npc.aggro_radius, npc.cast_percentage, npc.randomize, npc.soga_model_type, npc.heroic_flag, npc.alignment, npc.elemental, npc.arcane, npc.noxious, s.savagery, s.dissonance, npc.hide_hood, npc.emote_state, s.prefix, s.suffix, s.last_name, s.expansion_flag, s.disable_sounds\n"
|
|
|
"FROM spawn s\n"
|
|
|
"INNER JOIN spawn_npcs npc\n"
|
|
|
"ON s.id = npc.spawn_id\n"
|
|
@@ -1022,6 +1022,11 @@ void WorldDatabase::LoadNPCs(ZoneServer* zone){
|
|
|
npc->SetSuffixTitle(row[73]);
|
|
|
npc->SetLastName(row[74]);
|
|
|
|
|
|
+ // xpack value handled at top at position 75
|
|
|
+
|
|
|
+ int8 disableSounds = atoul(row[76]);
|
|
|
+ npc->SetSoundsDisabled(disableSounds);
|
|
|
+
|
|
|
zone->AddNPC(id, npc);
|
|
|
total++;
|
|
|
LogWrite(NPC__DEBUG, 5, "NPC", "---Loading NPC: '%s' (%u)", npc->appearance.name, id);
|
|
@@ -1040,7 +1045,7 @@ void WorldDatabase::LoadSigns(ZoneServer* zone){
|
|
|
Sign* sign = 0;
|
|
|
int32 id = 0;
|
|
|
int32 total = 0;
|
|
|
- MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT ss.spawn_id, s.name, s.model_type, s.size, s.show_command_icon, ss.widget_id, ss.widget_x, ss.widget_y, ss.widget_z, s.command_primary, s.command_secondary, s.collision_radius, ss.icon, ss.type, ss.title, ss.description, ss.sign_distance, ss.zone_id, ss.zone_x, ss.zone_y, ss.zone_z, ss.zone_heading, ss.include_heading, ss.include_location, s.transport_id, s.size_offset, s.display_hand_icon, s.visual_state\n"
|
|
|
+ MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT ss.spawn_id, s.name, s.model_type, s.size, s.show_command_icon, ss.widget_id, ss.widget_x, ss.widget_y, ss.widget_z, s.command_primary, s.command_secondary, s.collision_radius, ss.icon, ss.type, ss.title, ss.description, ss.sign_distance, ss.zone_id, ss.zone_x, ss.zone_y, ss.zone_z, ss.zone_heading, ss.include_heading, ss.include_location, s.transport_id, s.size_offset, s.display_hand_icon, s.visual_state, s.expansion_flag, s.disable_sounds\n"
|
|
|
"FROM spawn s\n"
|
|
|
"INNER JOIN spawn_signs ss\n"
|
|
|
"ON s.id = ss.spawn_id\n"
|
|
@@ -1053,6 +1058,10 @@ void WorldDatabase::LoadSigns(ZoneServer* zone){
|
|
|
zone->GetZoneID());
|
|
|
|
|
|
while(result && (row = mysql_fetch_row(result))){
|
|
|
+ int32 signXpackFlag = atoul(row[28]);
|
|
|
+ if (!CheckExpansionFlags(zone, signXpackFlag))
|
|
|
+ continue;
|
|
|
+
|
|
|
id = atoul(row[0]);
|
|
|
if(zone->GetSign(id, true))
|
|
|
continue;
|
|
@@ -1098,6 +1107,12 @@ void WorldDatabase::LoadSigns(ZoneServer* zone){
|
|
|
sign->SetSizeOffset(atoi(row[25]));
|
|
|
sign->appearance.display_hand_icon = atoi(row[26]);
|
|
|
sign->SetVisualState(atoi(row[27]));
|
|
|
+
|
|
|
+ // xpack value handled at top at position 28
|
|
|
+
|
|
|
+ int8 disableSounds = atoul(row[29]);
|
|
|
+ sign->SetSoundsDisabled(disableSounds);
|
|
|
+
|
|
|
zone->AddSign(id, sign);
|
|
|
total++;
|
|
|
|
|
@@ -1113,7 +1128,7 @@ void WorldDatabase::LoadWidgets(ZoneServer* zone){
|
|
|
Widget* widget = 0;
|
|
|
int32 id = 0;
|
|
|
int32 total = 0;
|
|
|
- MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT sw.spawn_id, s.name, s.model_type, s.size, s.show_command_icon, sw.widget_id, sw.widget_x, sw.widget_y, sw.widget_z, s.command_primary, s.command_secondary, s.collision_radius, sw.include_heading, sw.include_location, sw.icon, sw.type, sw.open_heading, sw.open_y, sw.action_spawn_id, sw.open_sound_file, sw.close_sound_file, sw.open_duration, sw.closed_heading, sw.linked_spawn_id, sw.close_y, s.transport_id, s.size_offset, sw.house_id, sw.open_x, sw.open_z, sw.close_x, sw.close_z, s.display_hand_icon, s.expansion_flag\n"
|
|
|
+ MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT sw.spawn_id, s.name, s.model_type, s.size, s.show_command_icon, sw.widget_id, sw.widget_x, sw.widget_y, sw.widget_z, s.command_primary, s.command_secondary, s.collision_radius, sw.include_heading, sw.include_location, sw.icon, sw.type, sw.open_heading, sw.open_y, sw.action_spawn_id, sw.open_sound_file, sw.close_sound_file, sw.open_duration, sw.closed_heading, sw.linked_spawn_id, sw.close_y, s.transport_id, s.size_offset, sw.house_id, sw.open_x, sw.open_z, sw.close_x, sw.close_z, s.display_hand_icon, s.expansion_flag, s.disable_sounds\n"
|
|
|
"FROM spawn s\n"
|
|
|
"INNER JOIN spawn_widgets sw\n"
|
|
|
"ON s.id = sw.spawn_id\n"
|
|
@@ -1125,7 +1140,7 @@ void WorldDatabase::LoadWidgets(ZoneServer* zone){
|
|
|
"GROUP BY s.id",
|
|
|
zone->GetZoneID());
|
|
|
while(result && (row = mysql_fetch_row(result))){
|
|
|
- int32 widgetXpackFlag = atoul(row[32]);
|
|
|
+ int32 widgetXpackFlag = atoul(row[33]);
|
|
|
if (!CheckExpansionFlags(zone, widgetXpackFlag))
|
|
|
continue;
|
|
|
|
|
@@ -1189,6 +1204,12 @@ void WorldDatabase::LoadWidgets(ZoneServer* zone){
|
|
|
widget->SetCloseX(atof(row[30]));
|
|
|
widget->SetCloseZ(atof(row[31]));
|
|
|
widget->appearance.display_hand_icon = atoi(row[32]);
|
|
|
+
|
|
|
+ // xpack value handled at top at position 33
|
|
|
+
|
|
|
+ int8 disableSounds = atoul(row[34]);
|
|
|
+ widget->SetSoundsDisabled(disableSounds);
|
|
|
+
|
|
|
zone->AddWidget(id, widget);
|
|
|
total++;
|
|
|
|
|
@@ -1204,7 +1225,7 @@ void WorldDatabase::LoadObjects(ZoneServer* zone){
|
|
|
Object* object = 0;
|
|
|
int32 id = 0;
|
|
|
int32 total = 0;
|
|
|
- MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT so.spawn_id, s.name, s.race, s.model_type, s.command_primary, s.command_secondary, s.targetable, s.size, s.show_name, s.visual_state, s.attackable, s.show_level, s.show_command_icon, s.display_hand_icon, s.faction_id, s.collision_radius, s.transport_id, s.size_offset, so.device_id, s.expansion_flag\n"
|
|
|
+ MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT so.spawn_id, s.name, s.race, s.model_type, s.command_primary, s.command_secondary, s.targetable, s.size, s.show_name, s.visual_state, s.attackable, s.show_level, s.show_command_icon, s.display_hand_icon, s.faction_id, s.collision_radius, s.transport_id, s.size_offset, so.device_id, s.expansion_flag, s.disable_sounds\n"
|
|
|
"FROM spawn s\n"
|
|
|
"INNER JOIN spawn_objects so\n"
|
|
|
"ON s.id = so.spawn_id\n"
|
|
@@ -1253,6 +1274,12 @@ void WorldDatabase::LoadObjects(ZoneServer* zone){
|
|
|
object->SetTransporterID(atoul(row[16]));
|
|
|
object->SetSizeOffset(atoi(row[17]));
|
|
|
object->SetDeviceID(atoi(row[18]));
|
|
|
+
|
|
|
+ // xpack value handled at top at position 19
|
|
|
+
|
|
|
+ int8 disableSounds = atoul(row[20]);
|
|
|
+ object->SetSoundsDisabled(disableSounds);
|
|
|
+
|
|
|
zone->AddObject(id, object);
|
|
|
total++;
|
|
|
|
|
@@ -1268,7 +1295,7 @@ void WorldDatabase::LoadGroundSpawns(ZoneServer* zone){
|
|
|
GroundSpawn* spawn = 0;
|
|
|
int32 id = 0;
|
|
|
int32 total = 0;
|
|
|
- MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT sg.spawn_id, s.name, s.race, s.model_type, s.command_primary, s.command_secondary, s.targetable, s.size, s.show_name, s.visual_state, s.attackable, s.show_level, s.show_command_icon, s.display_hand_icon, s.faction_id, s.collision_radius, sg.number_harvests, sg.num_attempts_per_harvest, sg.groundspawn_id, sg.collection_skill, s.size_offset, s.expansion_flag\n"
|
|
|
+ MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT sg.spawn_id, s.name, s.race, s.model_type, s.command_primary, s.command_secondary, s.targetable, s.size, s.show_name, s.visual_state, s.attackable, s.show_level, s.show_command_icon, s.display_hand_icon, s.faction_id, s.collision_radius, sg.number_harvests, sg.num_attempts_per_harvest, sg.groundspawn_id, sg.collection_skill, s.size_offset, s.expansion_flag, s.disable_sounds\n"
|
|
|
"FROM spawn s\n"
|
|
|
"INNER JOIN spawn_ground sg\n"
|
|
|
"ON s.id = sg.spawn_id\n"
|
|
@@ -1320,6 +1347,12 @@ void WorldDatabase::LoadGroundSpawns(ZoneServer* zone){
|
|
|
spawn->SetGroundSpawnEntryID(atoul(row[18]));
|
|
|
spawn->SetCollectionSkill(row[19]);
|
|
|
spawn->SetSizeOffset(atoi(row[20]));
|
|
|
+
|
|
|
+ // xpack value handled at top at position 21
|
|
|
+
|
|
|
+ int8 disableSounds = atoul(row[22]);
|
|
|
+ spawn->SetSoundsDisabled(disableSounds);
|
|
|
+
|
|
|
zone->AddGroundSpawn(id, spawn);
|
|
|
total++;
|
|
|
LogWrite(GROUNDSPAWN__DEBUG, 5, "GSpawn", "---Loading GroundSpawn: '%s' (%u)", spawn->appearance.name, id);
|
|
@@ -6091,6 +6124,7 @@ bool WorldDatabase::LoadGroundSpawn(ZoneServer* zone, int32 spawn_id) {
|
|
|
spawn->SetGroundSpawnEntryID(result.GetInt32(18));
|
|
|
spawn->SetCollectionSkill(result.GetString(19));
|
|
|
spawn->SetSizeOffset(result.GetInt8(20));
|
|
|
+
|
|
|
zone->AddGroundSpawn(id, spawn);
|
|
|
|
|
|
if (!zone->GetGroundSpawnEntries(spawn->GetGroundSpawnEntryID()))
|