Thread: headicons dont turn off when skulled

Results 1 to 2 of 2
  1. #1 shorten code 
    Rigged
    Guest
    Code:
    	public void getHead() {
    		if (protMage && !isSkulled)
    			headIcon = 2;
    		if (protRange && !isSkulled)
    			headIcon = 1;
    		if(protMelee && !isSkulled)
    			headIcon = 0;
    		if(ret && !isSkulled)
    			headIcon = 3;
    		if(redempt && !isSkulled)
    			headIcon = 5;
    		if(smite && !isSkulled)
    			headIcon = 4;
    		if(protMage && isSkulled)
    			headIcon = 2;
    		if(protRange && isSkulled)
    			headIcon = 1;
    		if(protMelee && isSkulled)
    			headIcon = 0;
    		if(ret && isSkulled)
    			headIcon = 3;
    		if(redempt && isSkulled)
    			headIcon = 5;
    		if(smite && isSkulled)
    			headIcon = 4;
    		else if(protMage && isSkulled || protRange && isSkulled || protMelee && isSkulled || ret && isSkulled || redempt && isSkulled || smite && isSkulled)
    			skullIcon = 0;
    		else if(!protMage && isSkulled || !protRange && isSkulled || !protMelee && isSkulled || !ret && isSkulled || !redempt && isSkulled || !smite && isSkulled)
    			headIcon = -1;
    		else if(!protMage && !protRange && !protMelee && !ret && !redempt && !smite && isSkulled)
    			skullIcon = 0;
    		else if(!protMage && !protRange && !protMelee && !ret && !redempt && !smite && !isSkulled)
    			headIcon = -1;
    	}
    I fixed it, but is there a way to make this shorter?
    Reply With Quote  
     

  2. #2  
    Community Veteran

    Dexter Morgan's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    4,419
    Thanks given
    1,184
    Thanks received
    757
    Rep Power
    3098
    Use brackets...
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •