Jump to content

virusav

Members
  • Posts

    84
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by virusav

  1. Can somebody lay out sniffs version 3.3.5a? Thanks in advance.
  2. There is a spell 47214 with the effect SPELL_EFFECT_PERSISTENT_AREA_AURA, which imposes an aura SPELL_AURA_PERIODIC_DUMMY. Cast is possible for the two entry of NPC, respectively, have different effects. The kernel code can not be attached to the NPC, and therefore need a script type 2 diabetes, but there is treatment effect was not found. I tried to write to existing treatments dummi effects in type 2 diabetes, but nothing worked. Wrote the script for the AI, but ran into a problem that the AI does not work out of the starter-code Spell.cpp: case TARGET_AREAEFFECT_CUSTOM: { if (m_spellInfo->Effect[effIndex] == SPELL_EFFECT_PERSISTENT_AREA_AURA) break; else Another school of the animation: cast on the target is at once rather than at the end of the animation. And this is not the first spell with this problem. How can we solve these problems?
  3. There are examples of loot that will be lost?
  4. Table `npc_gossip` is no longer needed, since All menus can be realized through the table `gossip_ ...`. Patch: diff --git a/sql/mangos.sql b/sql/mangos.sql index 9750f81..03b5208 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -4018,26 +4018,6 @@ LOCK TABLES `milling_loot_template` WRITE; UNLOCK TABLES; -- --- Table structure for table `npc_gossip` --- - -DROP TABLE IF EXISTS `npc_gossip`; -CREATE TABLE `npc_gossip` ( - `npc_guid` int(10) unsigned NOT NULL default '0', - `textid` mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (`npc_guid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `npc_gossip` --- - -LOCK TABLES `npc_gossip` WRITE; -/*!40000 ALTER TABLE `npc_gossip` DISABLE KEYS */; -/*!40000 ALTER TABLE `npc_gossip` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `npc_spellclick_spells` -- diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 0f50875..fc21428 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -558,7 +558,6 @@ ChatCommand * ChatHandler::getCommandTable() { "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", NULL }, { "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL }, { "milling_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMillingCommand, "", NULL }, - { "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL }, { "npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTextCommand, "", NULL }, { "npc_spellclick_spells", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellClickSpellsCommand, "", NULL }, { "npc_trainer", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcTrainerCommand, "", NULL }, diff --git a/src/game/Chat.h b/src/game/Chat.h index 7e72cdc..1b81c70 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -443,7 +443,6 @@ class MANGOS_DLL_SPEC ChatHandler bool HandleReloadLootTemplatesSpellCommand(char* args); bool HandleReloadMailLevelRewardCommand(char* args); bool HandleReloadMangosStringCommand(char* args); - bool HandleReloadNpcGossipCommand(char* args); bool HandleReloadNpcTextCommand(char* args); bool HandleReloadNpcTrainerCommand(char* args); bool HandleReloadNpcVendorCommand(char* args); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 211709a..f530ab5 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -271,10 +271,8 @@ bool ChatHandler::HandleReloadAllLootCommand(char* /*args*/) return true; } -bool ChatHandler::HandleReloadAllNpcCommand(char* args) +bool ChatHandler::HandleReloadAllNpcCommand(char* /*args*/) { - if (*args!='a') // will be reloaded from all_gossips - HandleReloadNpcGossipCommand((char*)"a"); HandleReloadNpcTrainerCommand((char*)"a"); HandleReloadNpcVendorCommand((char*)"a"); HandleReloadPointsOfInterestCommand((char*)"a"); @@ -346,7 +344,6 @@ bool ChatHandler::HandleReloadAllGossipsCommand(char* args) if (*args!='a') // already reload from all_scripts HandleReloadGossipScriptsCommand((char*)"a"); HandleReloadGossipMenuCommand((char*)"a"); - HandleReloadNpcGossipCommand((char*)"a"); HandleReloadPointsOfInterestCommand((char*)"a"); return true; } @@ -617,14 +614,6 @@ bool ChatHandler::HandleReloadMangosStringCommand(char* /*args*/) return true; } -bool ChatHandler::HandleReloadNpcGossipCommand(char* /*args*/) -{ - sLog.outString( "Re-Loading `npc_gossip` Table!" ); - sObjectMgr.LoadNpcGossips(); - SendGlobalSysMessage("DB table `npc_gossip` reloaded."); - return true; -} - bool ChatHandler::HandleReloadNpcTextCommand(char* /*args*/) { sLog.outString( "Re-Loading `npc_text` Table!" ); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index c966206..be6f0ff 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -8432,57 +8432,6 @@ void ObjectMgr::LoadVendorTemplates() sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr); } -void ObjectMgr::LoadNpcGossips() -{ - - m_mCacheNpcTextIdMap.clear(); - - QueryResult* result = WorldDatabase.Query("SELECT npc_guid, textid FROM npc_gossip"); - if( !result ) - { - BarGoLink bar(1); - - bar.step(); - - sLog.outString(); - sLog.outErrorDb(">> Loaded `npc_gossip`, table is empty!"); - return; - } - - BarGoLink bar(result->GetRowCount()); - - uint32 count = 0; - uint32 guid,textid; - do - { - bar.step(); - - Field* fields = result->Fetch(); - - guid = fields[0].GetUInt32(); - textid = fields[1].GetUInt32(); - - if (!GetCreatureData(guid)) - { - sLog.outErrorDb("Table `npc_gossip` have nonexistent creature (GUID: %u) entry, ignore. ",guid); - continue; - } - if (!GetGossipText(textid)) - { - sLog.outErrorDb("Table `npc_gossip` for creature (GUID: %u) have wrong Textid (%u), ignore. ", guid, textid); - continue; - } - - m_mCacheNpcTextIdMap[guid] = textid ; - ++count; - - } while (result->NextRow()); - delete result; - - sLog.outString(); - sLog.outString( ">> Loaded %d NpcTextId ", count ); -} - void ObjectMgr::LoadGossipMenu(std::set<uint32>& gossipScriptSet) { m_mGossipMenusMap.clear(); diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index c569b80..912699b 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -704,8 +704,6 @@ class ObjectMgr void LoadWeatherZoneChances(); void LoadGameTele(); - void LoadNpcGossips(); - void LoadGossipMenus(); void LoadVendorTemplates(); diff --git a/src/game/World.cpp b/src/game/World.cpp index b59ba84..5e6fccd 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1199,9 +1199,6 @@ void World::SetInitialWorldSettings() sLog.outString( "Loading Instance encounters data..." ); // must be after Creature loading sObjectMgr.LoadInstanceEncounters(); - sLog.outString( "Loading Npc Text Id..." ); - sObjectMgr.LoadNpcGossips(); // must be after load Creature and LoadGossipText - sLog.outString( "Loading Gossip scripts..." ); sScriptMgr.LoadGossipScripts(); // must be before gossip menu options Request to delete a table: DROP TABLE IF EXISTS `npc_gossip`;
  5. You can summon an object-entourage after adding the main object in the world. 1. In the end, both objects must be at one point, with the same orientation, etc. 2. If any action with the main object, the same steps need to occur with entourage. 3. Can the structure of the main objects of the code stored no entourage, and a structure that will contain the entry and guid, make it easier to find dependent object instead of looking for all within a certain radius.
  6. The patch is tested, the entourage summon to the point the main subject. I am interested in optimizing the patch. Perhaps there is an easier way, but I do not know about that.
  7. 1. GAMEOBJECT_TYPE_TRAP (entourage) should summon AUTOMATICALLY to the point, phase, etc. the main object. Should take into account events and pull. 2. With the entourage must be made the same steps as with the main object (use, summon, despawn, etc.). I wrote a test patch to summon the entourage to the main object: http://paste2.org/p/1866839 Turned out as a tedious and uncertain, should be more simple and correct solution. Need advice on this matter.
  8. This is just a grouping of quests in the list. No check there is no need, as a profession requirement is written into another field.
  9. Now that the tables have mangos specific format for the fields, we have to stick to this format and in this table.
  10. Checking the relevance of the topic.
  11. ZoneOrSort field with a negative value means the normal group quests in the list and in no way related to the requirement of professions. Tested on quests, 13311, 12518, 12798 12517 and for which the cache is now the same as in 335a, but can take no profession Inking. At 335a, it was also. The table has a field of quests and RequiredSkill RequiredSkillValue, which are responsible for demand occupations, so check the kernel superfluous. diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index e2d0be3..fcbd610 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3782,17 +3782,6 @@ void ObjectMgr::LoadQuests() qinfo->GetQuestId(),qinfo->ZoneOrSort); // no changes, quest not dependent from this value but can have problems at client (note some may be 0, we must allow this so no check) } - - //check for proper RequiredSkill value (skill case) - if (uint32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort))) - { - if (qinfo->RequiredSkill != skill_id) - { - sLog.outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkill` does not have a corresponding value (%u).", - qinfo->GetQuestId(),qinfo->ZoneOrSort,skill_id); - //override, and force proper value here? - } - } } // RequiredClasses, can be 0/CLASSMASK_ALL_PLAYABLE to allow any class
  12. Somehow, in the table `creature_linking_template` field in a format different from counterparts in other tables, and `entry` in general have auto-incremented. Patch: ALTER TABLE `creature_linking_template` CHANGE COLUMN `entry` `entry` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'creature_template.entry of the slave mob that is linked'; ALTER TABLE `creature_linking_template` CHANGE COLUMN `map` `map` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Id of map of the mobs'; ALTER TABLE `creature_linking_template` CHANGE COLUMN `master_entry` `master_entry` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'master to trigger events'; ALTER TABLE `creature_linking_template` CHANGE COLUMN `flag` `flag` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'flag - describing what should happen when'; In mangos.sql make table query should look like this: CREATE TABLE `creature_linking_template` ( `entry` mediumint(8) unsigned NOT NULL default '0' COMMENT 'creature_template.entry of the slave mob that is linked', `map` smallint(5) unsigned NOT NULL default '0' COMMENT 'Id of map of the mobs', `master_entry` mediumint(8) unsigned NOT NULL default '0' COMMENT 'master to trigger events', `flag` mediumint(8) unsigned NOT NULL default '0' COMMENT 'flag - describing what should happen when', PRIMARY KEY (`entry`,`map`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature Linking System'; And again, in the tables `spell_pet_auras` and `spell_script_target` somehow encoding is latin1, though always utf8.
  13. If you add a column, then: 1. Where will write the conditions triggering the script? 2. Will not be able to assign multiple scripts.
  14. There are cases when you open the menu should trigger action, depending on various conditions. Patch: diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h index 9e46bb2..163ae28 100644 --- a/src/game/GossipDef.h +++ b/src/game/GossipDef.h @@ -49,6 +49,7 @@ enum Gossip_Option GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER (4096) GOSSIP_OPTION_UNLEARNTALENTS = 16, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) GOSSIP_OPTION_UNLEARNPETSKILLS = 17, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) + GOSSIP_OPTION_AUTOSCRIPT = 18, GOSSIP_OPTION_MAX }; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a8591ba..828a8ed 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -8737,9 +8737,9 @@ void ObjectMgr::LoadGossipMenuItems() if (gMenuItem.action_script_id) { - if (gMenuItem.option_id != GOSSIP_OPTION_GOSSIP) + if (gMenuItem.option_id != GOSSIP_OPTION_GOSSIP && gMenuItem.option_id != GOSSIP_OPTION_AUTOSCRIPT) { - sLog.outErrorDb("Table gossip_menu_option for menu %u, id %u have action_script_id %u but option_id is not GOSSIP_OPTION_GOSSIP, ignoring", gMenuItem.menu_id, gMenuItem.id, gMenuItem.action_script_id); + sLog.outErrorDb("Table gossip_menu_option for menu %u, id %u have action_script_id %u but option_id is not GOSSIP_OPTION_GOSSIP and is not GOSSIP_OPTION_AUTOSCRIPT, ignoring", gMenuItem.menu_id, gMenuItem.id, gMenuItem.action_script_id); continue; } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d4e246e..ea3ab39 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -13011,6 +13011,9 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId) canSeeQuests = false; continue; } + + if (itr->second.option_id == GOSSIP_OPTION_AUTOSCRIPT) + GetMap()->ScriptsStart(sGossipScripts, itr->second.action_script_id, this, pSource); } if (pSource->GetTypeId() == TYPEID_UNIT) Requests for the test patch: UPDATE `gameobject_template` SET `data3`=2211 WHERE `entry`=160445; DELETE FROM `gossip_menu_option` WHERE `menu_id`=2211; DELETE FROM `gossip_scripts` WHERE `id` IN (2211,6540,7); REPLACE INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `cond_1`, `cond_1_val_1`, `cond_1_val_2`, `cond_2`, `cond_2_val_1`, `cond_2_val_2`, `cond_3`, `cond_3_val_1`, `cond_3_val_2`) VALUES (2211, 0, 0, NULL, 18, 1, -1, 0, 2211, 0, 0, NULL, 9, 3821, 0, 0, 0, 0, 0, 0, 0), (2211, 1, 0, NULL, 18, 1, -1, 0, 6540, 0, 0, NULL, 22, 3821, 0, 0, 0, 0, 0, 0, 0), (2211, 2, 0, 'Я не служитель культа, ты, монстр! Иди сюда и встреть свою погибель!', 1, 1, -1, 0, 7, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0); REPLACE INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (2211, 1, 10, 9136, 60000, 0, 0, 1, 0, 0, 0, 0, -7917.38, -2610.53, 221.123, 5.04026, ''), (7, 1, 15, 25035, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''), (6540, 1, 15, 24803, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); In this version of: 1. In the presence of Quest 3821 - summon NPC. 2. In the absence of Quest 3821 - cast spell. 3. Menu items are displayed regardless of autoscripts.
  15. Core: 11760. Patch: diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f4832d9..1c7e2ab 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1346,6 +1346,22 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) DoCreateItem(eff_idx, newitemid); return; } + case 40962: // Blade's Edge Terrace Demon Boss Summon Branch + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + + uint32 spell_id = 0; + switch (urand(1,4)) + { + case 1: spell_id = 40957; break; // Blade's Edge Terrace Demon Boss Summon 1 + case 2: spell_id = 40959; break; // Blade's Edge Terrace Demon Boss Summon 2 + case 3: spell_id = 40960; break; // Blade's Edge Terrace Demon Boss Summon 3 + case 4: spell_id = 40961; break; // Blade's Edge Terrace Demon Boss Summon 4 + } + unitTarget->CastSpell(unitTarget, spell_id, true); + return; + } case 42287: // Salvage Wreckage { if (m_caster->GetTypeId() != TYPEID_PLAYER)
  16. Perhaps the list by double clicking on the name of the topic. Or in the same list next to the name topic click on the icon editing. I have in front of the subject icon is there, but does not rename. Apparently, the section adopted by the patches it was impossible. Better to ask other developers.
  17. The patch is not relevant since 11334.
  18. Corrected paragraph 2, changed the code a bit and link to the first post. It is strange that m_target->SetChannelObjectGuid(ObjectGuid()); m_target->SetUInt32Value(UNIT_CHANNEL_SPELL,0); not satisfied when you remove the aura. Another interesting point: when you remove the aura 46675 timer in a row ((Creature*)m_target)->ForcedDespawn(100); is the death of NPC, and not despawn.
  19. Correct paragraph 3, and updated the link in first post.
  20. Queries: 1. For mangos: DELETE FROM `creature_ai_scripts` WHERE `id` = 2612703; DELETE FROM `spell_script_target` WHERE `entry` = 46704; INSERT INTO `spell_script_target` SET `entry` = 46704, `type` = 1, `targetentry` = 26117; UPDATE `creature` SET `position_x` = 3570.79, `position_y` = 6650.47, `position_z` = 195.181, `orientation` = 0.646218 WHERE `guid` = 118396; UPDATE `creature_template` SET `scriptname` = 'npc_raelorasz' WHERE `entry` = 26117; UPDATE `creature_template` SET `scriptname` = 'npc_nexus_drake_hatchling' WHERE `entry` = 26127; 2. For SD2: INSERT INTO `script_texts` (`entry`, `content_default`, `comment`) VALUES (-1000015, 'Nexus Drake Hatchling', 'SAY_RAELORASZ_1'); UPDATE `script_texts` SET `content_loc8` = 'Hatchling Dragon Nexus'WHERE `entry` =- 1000015; Patch for SD2: http://paste2.org/p/1291180
  21. Patch: http://paste2.org/p/1310538 There are 3 problems: 1. By sniffs must be cast spells 46675, 46678, then 46691 but spell 46691 somehow cancels 46675, so long had to reorder. 2. After complete quest NPC despawn, but his re-spawn visually shows the result of casting spells 46674, ie beam from the NPC to the player. Tried to scroll through the list of spells with dummi-auras and output to a log, but this spell on the list was not. - FIXED 3. Remove from the NPC all the negative effects that, after changing the faction, he again went into battle. - FIXED Another part of the quest is realized in SD2. To these quests, finally, earned is necessary to solve these problems.
  22. I know about this patch, but I like my version.
  23. How tested the patch, intellect, AP and HP increase. In patch coefficients are added to the already existing and should be multiplied. As will be time corrected.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use