File tree Expand file tree Collapse file tree
Intersect.Client.Core/Interface/Game/Spells Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,22 +219,24 @@ public override void Update()
219219 Icon . RenderColor . A = 255 ;
220220 }
221221
222- if ( Path . GetFileName ( Icon . Texture ? . Name ) ! = spell . Icon )
222+ if ( Icon . TextureFilename = = spell . Icon )
223223 {
224- var spellIconTexture = GameContentManager . Current . GetTexture ( TextureType . Spell , spell . Icon ) ;
225- if ( spellIconTexture != null )
226- {
227- Icon . Texture = spellIconTexture ;
228- Icon . RenderColor . A = ( byte ) ( _cooldownLabel . IsVisibleInParent ? 100 : 255 ) ;
229- Icon . IsVisibleInParent = true ;
230- }
231- else
224+ return ;
225+ }
226+
227+ var spellTexture = GameContentManager . Current . GetTexture ( TextureType . Spell , spell . Icon ) ;
228+ if ( spellTexture != default )
229+ {
230+ Icon . Texture = spellTexture ;
231+ Icon . RenderColor . A = ( byte ) ( _cooldownLabel . IsVisibleInParent ? 100 : 255 ) ;
232+ Icon . IsVisibleInParent = true ;
233+ }
234+ else
235+ {
236+ if ( Icon . Texture != null )
232237 {
233- if ( Icon . Texture != null )
234- {
235- Icon . Texture = null ;
236- Icon . IsVisibleInParent = false ;
237- }
238+ Icon . Texture = null ;
239+ Icon . IsVisibleInParent = false ;
238240 }
239241 }
240242 }
You can’t perform that action at this time.
0 commit comments