Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3.5) Dire Maul Tribute Conditions #24115

Open
dr-j opened this issue Jan 28, 2020 · 12 comments
Open

[3.3.5) Dire Maul Tribute Conditions #24115

dr-j opened this issue Jan 28, 2020 · 12 comments

Comments

@dr-j
Copy link
Contributor

dr-j commented Jan 28, 2020

Conditions for for the 3.3.5 script i writ some time ago so option to spawn tribute chest is only shown if at least one boss has been skipped the more bosses you leave alive the more loot is meant to drop however at this moment I cant get Gameobject Loot condition source type to work with the boss state condition, the gameobject loot entry contains 4 entries to same reference loot template and tried conditioning but seems conditions for loot get ignored

DELETE FROM `smart_scripts` WHERE `entryorguid`=11501 AND `source_type`=0 AND `id`>5;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14325 AND `source_type`=0 AND `id`>15;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14326 AND `source_type`=0 AND `id`>7;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14321 AND `source_type`=0 AND `id`>9;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14323 AND `source_type`=0 AND `id`>14;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14322 AND `source_type`=0 AND `id`>6;

INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES 
(11501, 0, 6, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 16, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'King Gordok - On Death - Set Boss State'),
(14325, 0, 16, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 15, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Captain Kromcrush - On Death - Set Boss State'),
(14326, 0, 8, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 11, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Guard Mol\'dar - On Death - Set Boss State'),
(14321, 0, 10, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 13, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Guard Fengus - On Death - Set Boss State'),
(14323, 0, 15, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 14, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Guard Slip Kik - On Death - Set Boss State'),
(14322, 0, 7, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 34, 12, 3, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stomper Kreeg - On Death - Set Boss State');

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=5740;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=16577;

INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES 
(15, 5740, 0, 0, 0, 13, 1, 11, 0, 2, 0, 0, 0, '', 'Show Gossip only if Guard Mol\'dar alive OR'),
(15, 5740, 0, 0, 1, 13, 1, 13, 0, 2, 0, 0, 0, '', 'Show Gossip only if Guard Fengus alive OR'),
(15, 5740, 0, 0, 2, 13, 1, 14, 0, 2, 0, 0, 0, '', 'Show Gossip only if Guard Slip Kik alive OR'),
(15, 5740, 0, 0, 3, 13, 1, 15, 0, 2, 0, 0, 0, '', 'Show Gossip only if Captain Kromcrush alive OR'),
(15, 5740, 0, 0, 4, 13, 1, 12, 0, 2, 0, 0, 0, '', 'Show Gossip only if Stomper Kreeg alive');
@Killyana
Copy link
Member

Ref #6429

@Rushor
Copy link
Contributor

Rushor commented Jan 31, 2020

are different loot groups actually working?

@dr-j
Copy link
Contributor Author

dr-j commented Feb 1, 2020

How exactly do different loot modes work because one thing is the existing four gameobject loot entries to same reference loot entry have different loot modes set all get added regardless though

@Rushor
Copy link
Contributor

Rushor commented Feb 1, 2020

Hm okay so Every chest must have different loot

@ghost
Copy link

ghost commented Feb 5, 2020

Hm okay so Every chest must have different loot

Based on that fact, it does not seem to be a practical idea to use reference loot tables for those chests.

@dr-j
Copy link
Contributor Author

dr-j commented Feb 6, 2020

and been since you dont have to leave all bosses alive but the more you leave alive the more loot you get from tribute chest we need to somehow set lootmode on chest before its created by spell depending on how many bosses are left alive.

@Rushor
Copy link
Contributor

Rushor commented Feb 6, 2020

cannot ee do sth like that:

assign reference_loot for all bosses to the chest.
chest XX - reference_loot 1
chest XX - reference_loot 2
chest XX - reference_loot 3

with boss stuff you added above:
Boss 1 - on death - setinstance data 1 1
Boss 2 - on death - setinstance data 2 2
Boss 3 - on death - setinstance data 3 3

and them add conditions to the loot of the chest
chest - reference_loot 1 - only show if instance data is 1 1
chest - reference_loot 2 - only show if instance data is 2 2
chest - reference_loot3 - only show if instance data is 3 3

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=0 AND `SourceEntry`=0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(4,0,0,0,0,13,0,1,1,0,0,0,0,"","");

you wrote that condition check get's ignored - so sth with the conditionmgr is wrong?

@dr-j
Copy link
Contributor Author

dr-j commented Feb 6, 2020

Well condition was not working with reference loot and that previous post on issue about that loot should be different depending on how many bosses killed so we need something to count how many are still alive and set loot mode when object is created

@dr-j
Copy link
Contributor Author

dr-j commented Feb 6, 2020

Maybe conditionmgr does not support that source type with that condition type can’t think of anywhere else where that condition used with boss state to set different loot loot mode always used

@dr-j
Copy link
Contributor Author

dr-j commented Feb 6, 2020

These were conditions I tried and tried both with item numbers from loot template and reference loot entries but regardless of condition all items still dropped


	
(4, 16577, 1, 0, 0, 13, 1, 11, 0, 2, 0, 0, 0, '', NULL),

(4, 16577, 2, 0, 0, 13, 1, 12, 0, 2, 0, 0, 0, '', NULL),
	
(4, 16577, 3, 0, 0, 13, 1, 13, 0, 2, 0, 0, 0, '', NULL),
	
(4, 16577, 4, 0, 0, 13, 1, 14, 0, 2, 0, 0, 0, '', NULL);

Have tried condition target 0/1 too and to test you need to set boss states for bosses 11-15 then spawn chest but same loot drops regardless (everything)

@Rushor
Copy link
Contributor

Rushor commented Feb 6, 2020

case CONDITION_INSTANCE_INFO:
        {
            Map* map = object->GetMap();
            if (map->IsDungeon())
            {
                if (InstanceScript const* instance = ((InstanceMap*)map)->GetInstanceScript())
                {
                    switch (ConditionValue3)
                    {
                        case INSTANCE_INFO_DATA:
                            condMeets = instance->GetData(ConditionValue1) == ConditionValue2;
                            break;
                        case INSTANCE_INFO_GUID_DATA:
                            condMeets = instance->GetGuidData(ConditionValue1) == ObjectGuid(uint64(ConditionValue2));
                            break;
                        case INSTANCE_INFO_BOSS_STATE:
                            condMeets = instance->GetBossState(ConditionValue1) == EncounterState(ConditionValue2);
                            break;
                        case INSTANCE_INFO_DATA64:
                            condMeets = instance->GetData64(ConditionValue1) == ConditionValue2;
                            break;
                    }
                }
            }
            break;
        }

so maybe that part of code does not incude the source (player) so there is no check that the player in the instance has condMeets fulfilled

or wait:

what if we check for closest creature? CONDITION_NEAR_CREATURE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants