Jump to content
TrinityCore

Phase system 6.2.2.20490


Daniel25
 Share

Recommended Posts

Im wondering what way phase system works now. Could someone explain me it and does he/she  a example to change the player phase to 2 so player can see creatures which have phase 2?

Example:

-- Elder Voidcallers 88712
DELETE FROM `creature` WHERE `id`=88712;
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseId`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
(@CGUID+1, 88712, 1116, 3, 169, 1113.039, -1864.503, 20.21025, 5.479156, 7200, 0, 0), -- 88712 (Area: 7216)
(@CGUID+2, 88712, 1116, 3, 170, 1003.632, -1676.785, -2.709729, 4.07754, 7200, 0, 0); -- 88712 (Area: 7216)

-- Elder Voidcallers SAI
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=88712; -- Elder Voidcallers
DELETE FROM `smart_scripts` WHERE `entryorguid`=88712;
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`,`action_type`,`action_param1`,`action_param2`,
`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,
`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(88712,0,0,0,5,0,100,0,0,0,0,88712,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Elder Voidcallers - On Kill Elder Voidcallers - SMART_ACTION_SET_EVENT_PHASE 2 - Phase 2');

 

In this example, I set player phase to 2 when the player kill the creature with guid=@CGUID+1 which is in phase1= phaseid 169, so the player can see creature with guid=@CGUID+2 because this criature is in phase2=phaseid 170. Is it right?

Thanks in advance.

Edited by Whunter
Link to comment
Share on other sites

You are setting SAI event phase (equivalent to encounter phases, not visibility phases!)

You need to use SMART_ACTION_SET_INGAME_PHASE_ID with id equal to phaseId from `creature` table

 

however, you should take a look at sniffs to find if a spell is used for phasing instead (its very likely) - then you would just need to cast the spell instead trying to guess correct phase for spawns/sai action

  • Upvote 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...