@@ -15,14 +15,28 @@ public class QueryGeneratorTester
1515 private readonly IQueryGenerator < QuestChainDiff > questChain ;
1616 private readonly IQueryGenerator < CreatureDiff > creatureDiff ;
1717 private readonly IQueryGenerator < GameObjectDiff > gameobjectDiff ;
18+ private readonly IQueryGenerator < ICreatureText > creatureText ;
19+ private readonly IQueryGenerator < IGossipMenuOption > gossipMenuOption ;
20+ private readonly IQueryGenerator < IGossipMenuLine > gossipMenu ;
21+ private readonly IQueryGenerator < CreatureGossipUpdate > creatureTemplateDiff ;
22+ private readonly IQueryGenerator < IPointOfInterest > pointOfInterest ;
23+ private readonly IQueryGenerator < INpcTextFull > npcTextInsert ;
24+ private readonly IQueryGenerator < INpcText > npcTextDelete ;
1825
1926 public QueryGeneratorTester ( IQueryGenerator < CreatureSpawnModelEssentials > creature ,
2027 IQueryGenerator < GameObjectSpawnModelEssentials > gameobject ,
2128 IQueryGenerator < ISpawnGroupTemplate > spawnGroupTemplate ,
2229 IQueryGenerator < ISpawnGroupSpawn > spawnGroupSpawn ,
2330 IQueryGenerator < QuestChainDiff > questChain ,
2431 IQueryGenerator < CreatureDiff > creatureDiff ,
25- IQueryGenerator < GameObjectDiff > gameobjectDiff )
32+ IQueryGenerator < GameObjectDiff > gameobjectDiff ,
33+ IQueryGenerator < ICreatureText > creatureText ,
34+ IQueryGenerator < IGossipMenuOption > gossipMenuOption ,
35+ IQueryGenerator < IGossipMenuLine > gossipMenu ,
36+ IQueryGenerator < CreatureGossipUpdate > creatureTemplateDiff ,
37+ IQueryGenerator < IPointOfInterest > pointOfInterest ,
38+ IQueryGenerator < INpcTextFull > npcTextInsert ,
39+ IQueryGenerator < INpcText > npcTextDelete )
2640 {
2741 this . creature = creature ;
2842 this . gameobject = gameobject ;
@@ -31,6 +45,13 @@ public QueryGeneratorTester(IQueryGenerator<CreatureSpawnModelEssentials> creatu
3145 this . questChain = questChain ;
3246 this . creatureDiff = creatureDiff ;
3347 this . gameobjectDiff = gameobjectDiff ;
48+ this . creatureText = creatureText ;
49+ this . gossipMenuOption = gossipMenuOption ;
50+ this . gossipMenu = gossipMenu ;
51+ this . creatureTemplateDiff = creatureTemplateDiff ;
52+ this . pointOfInterest = pointOfInterest ;
53+ this . npcTextInsert = npcTextInsert ;
54+ this . npcTextDelete = npcTextDelete ;
3455 }
3556
3657 public IEnumerable < string ? > Tables ( )
@@ -39,64 +60,120 @@ public QueryGeneratorTester(IQueryGenerator<CreatureSpawnModelEssentials> creatu
3960 yield return gameobject . TableName ;
4061 yield return spawnGroupTemplate . TableName ;
4162 yield return spawnGroupSpawn . TableName ;
63+ yield return creatureText . TableName ;
64+ yield return gossipMenuOption . TableName ;
65+ yield return gossipMenu . TableName ;
66+ yield return creatureTemplateDiff . TableName ;
67+ yield return pointOfInterest . TableName ;
68+ yield return npcTextInsert . TableName ;
4269 }
4370
44- public IEnumerable < IQuery ? > Generate ( )
71+ public IEnumerable < Func < IQuery > > Generate ( )
4572 {
46- yield return creature . Insert ( new CreatureSpawnModelEssentials ( )
73+ yield return ( ) => gossipMenuOption . Insert ( new AbstractGossipMenuOption ( )
4774 {
48- Guid = int . MaxValue - 1
75+ MenuId = 1 ,
4976 } ) ;
50- yield return gameobject . Insert ( new GameObjectSpawnModelEssentials ( )
77+ yield return ( ) => gossipMenuOption . Delete ( new AbstractGossipMenuOption ( )
5178 {
52- Guid = int . MaxValue - 1
79+ MenuId = 1
5380 } ) ;
54- yield return creature . Delete ( new CreatureSpawnModelEssentials ( )
81+ yield return ( ) => gossipMenu . Insert ( new AbstractGossipMenuLine ( )
5582 {
56- Guid = int . MaxValue - 1
83+ MenuId = 1 ,
5784 } ) ;
58- yield return gameobject . Delete ( new GameObjectSpawnModelEssentials ( )
85+ yield return ( ) => gossipMenu . Delete ( new AbstractGossipMenuLine ( )
5986 {
60- Guid = int . MaxValue - 1
87+ MenuId = 1
88+ } ) ;
89+ yield return ( ) => creature . Insert ( new CreatureSpawnModelEssentials ( )
90+ {
91+ Guid = 0xFFFFFF - 1 ,
92+ Entry = 1
93+ } ) ;
94+ yield return ( ) => creatureDiff . Update ( new CreatureDiff ( )
95+ {
96+ Guid = 0xFFFFFF - 1 ,
97+ Position = Vector3 . Zero ,
98+ Orientation = 0
99+ } ) ;
100+ yield return ( ) => gameobject . Insert ( new GameObjectSpawnModelEssentials ( )
101+ {
102+ Guid = 0xFFFFFF - 1 ,
103+ Entry = 29
104+ } ) ;
105+ yield return ( ) => creature . Delete ( new CreatureSpawnModelEssentials ( )
106+ {
107+ Guid = 0xFFFFFF - 1
108+ } ) ;
109+ yield return ( ) => gameobjectDiff . Update ( new GameObjectDiff ( )
110+ {
111+ Guid = 0xFFFFFF - 1 ,
112+ Position = Vector3 . Zero ,
113+ Orientation = 0 ,
114+ Rotation = Quaternion . Identity
115+ } ) ;
116+ yield return ( ) => gameobject . Delete ( new GameObjectSpawnModelEssentials ( )
117+ {
118+ Guid = 0xFFFFFF - 1
61119 } ) ;
62- yield return spawnGroupTemplate . Insert ( new AbstractSpawnGroupTemplate ( )
120+ yield return ( ) => spawnGroupTemplate . Insert ( new AbstractSpawnGroupTemplate ( )
63121 {
64122 Id = int . MaxValue - 1
65123 } ) ;
66- yield return spawnGroupSpawn . Insert ( new AbstractSpawnGroupSpawn ( )
124+ yield return ( ) => spawnGroupSpawn . Insert ( new AbstractSpawnGroupSpawn ( )
67125 {
68126 TemplateId = int . MaxValue - 1 ,
69127 Guid = int . MaxValue - 1
70128 } ) ;
71- yield return spawnGroupTemplate . Delete ( new AbstractSpawnGroupTemplate ( )
129+ yield return ( ) => spawnGroupTemplate . Delete ( new AbstractSpawnGroupTemplate ( )
72130 {
73131 Id = int . MaxValue - 1
74132 } ) ;
75- yield return spawnGroupSpawn . Delete ( new AbstractSpawnGroupSpawn ( )
133+ yield return ( ) => spawnGroupSpawn . Delete ( new AbstractSpawnGroupSpawn ( )
76134 {
77135 TemplateId = int . MaxValue - 1 ,
78136 Guid = int . MaxValue - 1
79137 } ) ;
80- yield return questChain . Update ( new QuestChainDiff ( )
138+ yield return ( ) => questChain . Update ( new QuestChainDiff ( )
81139 {
82140 Id = int . MaxValue - 1 ,
83141 BreadcrumbQuestId = 1 ,
84142 ExclusiveGroup = - 2 ,
85143 NextQuestId = 3 ,
86144 PrevQuestId = - 1
87145 } ) ;
88- yield return creatureDiff . Update ( new CreatureDiff ( )
146+ yield return ( ) => creatureText . Insert ( new AbstractCreatureText ( )
89147 {
90- Guid = int . MaxValue - 1 ,
91- Position = Vector3 . Zero ,
92- Orientation = 0
148+ CreatureId = 1 ,
149+ GroupId = byte . MaxValue - 1 ,
150+ Id = byte . MaxValue - 1 ,
151+ Text = "abc"
93152 } ) ;
94- yield return gameobjectDiff . Update ( new GameObjectDiff ( )
153+ yield return ( ) => creatureText . Delete ( new AbstractCreatureText ( )
95154 {
96- Guid = int . MaxValue - 1 ,
97- Position = Vector3 . Zero ,
98- Orientation = 0 ,
99- Rotation = Quaternion . Identity
155+ CreatureId = 0xFFFFFF - 1
156+ } ) ;
157+ yield return ( ) => creatureTemplateDiff . Update ( new CreatureGossipUpdate ( )
158+ {
159+ Entry = 1 ,
160+ GossipMenuId = 1
161+ } ) ;
162+ yield return ( ) => pointOfInterest . Insert ( new AbstractPointOfInterest ( )
163+ {
164+ Id = 0xFFFFFF - 1
165+ } ) ;
166+ yield return ( ) => pointOfInterest . Delete ( new AbstractPointOfInterest ( )
167+ {
168+ Id = 0xFFFFFF - 1
169+ } ) ;
170+ yield return ( ) => npcTextInsert . Insert ( new AbstractNpcTextFull ( )
171+ {
172+ Id = 0xFFFFFF - 2
173+ } ) ;
174+ yield return ( ) => npcTextDelete . Delete ( new AbstractNpcText ( )
175+ {
176+ Id = 0xFFFFFF - 2
100177 } ) ;
101178 }
102179}
0 commit comments