diff Player.cpp @ 1354:05becb008006

Player::_49327B to Player::ProfessionOrGuildFlagsCorrect, removed a huge section of the function that's never used (only 4 inputs used)
author Grumpy7
date Sat, 13 Jul 2013 13:12:21 +0200
parents 8f69f77a0067
children af2fc30d765f
line wrap: on
line diff
--- a/Player.cpp	Sat Jul 13 12:35:02 2013 +0200
+++ b/Player.cpp	Sat Jul 13 13:12:21 2013 +0200
@@ -628,223 +628,35 @@
 }
 
 //----- (0049327B) --------------------------------------------------------
-int Player::_49327B(unsigned int uClass, int a3)
-{
-  Player *v3; // esi@1
-  char v4; // zf@4
-  __int16 v5; // dx@9
-  signed int result; // eax@84
-  unsigned int v7; // [sp-8h] [bp-10h]@3
-  int v8; // [sp-4h] [bp-Ch]@3
-
-  v3 = this;
+bool Player::GetProfessionOrGuildFlags( unsigned int uClass, int a3 )
+{
   if ( this->classType == uClass )
   {
-LABEL_84:
-    result = 1;
+    return true;
   }
   else
   {
+    if (!a3)
+    {
+      return false;
+    }
     switch ( uClass )
     {
-      case 0u:
-        v8 = a3;
-        v7 = 1;
-        goto LABEL_4;
-      case 1u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 17)
-          || _49327B(2u, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 3;
-        goto LABEL_4;
-      case 2u:
-        v5 = 19;
-        goto LABEL_82;
-      case 3u:
-        v5 = 21;
-        goto LABEL_82;
-      case 4u:
-        v8 = a3;
-        v7 = 5;
-        goto LABEL_4;
-      case 5u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 11)
-          || _49327B(6u, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 7;
-        goto LABEL_4;
-      case 6u:
-        if ( !a3 )
-          break;
-        v5 = 13;
-        goto LABEL_82;
-      case 7u:
-        if ( !a3 )
-          break;
-        v5 = 15;
-        goto LABEL_82;
-      case 8u:
-        v8 = a3;
-        v7 = 9;
-        goto LABEL_4;
-      case 9u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 23)
-          || _49327B(0xAu, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 11;
-        goto LABEL_4;
-      case 0xAu:
-        if ( !a3 )
-          break;
-        v5 = 25;
-        goto LABEL_82;
-      case 0xBu:
-        if ( !a3 )
-          break;
-        v5 = 27;
-        goto LABEL_82;
-      case 0xCu:
-        v8 = a3;
-        v7 = 13;
-        goto LABEL_4;
-      case 0xDu:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 41)
-          || _49327B(0xEu, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 15;
-        goto LABEL_4;
-      case 0xEu:
-        if ( !a3 )
-          break;
-        v5 = 43;
-        goto LABEL_82;
-      case 0xFu:
-        if ( !a3 )
-          break;
-        v5 = 45;
-        goto LABEL_82;
-      case 0x10u:
-        v8 = a3;
-        v7 = 17;
-        goto LABEL_4;
-      case 0x11u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 35)
-          || _49327B(0x12u, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 19;
-        goto LABEL_4;
-      case 0x12u:
-        if ( !a3 )
-          break;
-        v5 = 37;
-        goto LABEL_82;
-      case 0x13u:
-        v5 = 39;
-        goto LABEL_82;
-      case 0x14u:
-        v8 = a3;
-        v7 = 21;
-        goto LABEL_4;
-      case 0x15u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 29)
-          || _49327B(0x16u, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 23;
-        goto LABEL_4;
-      case 0x16u:
-        if ( !a3 )
-          break;
-        v5 = 31;
-        goto LABEL_82;
-      case 0x17u:
-        if ( !a3 )
-          break;
-        v5 = 33;
-        goto LABEL_82;
-      case 0x18u:
-        if ( !_49327B(0x19u, a3) )
-          goto LABEL_56;
-        break;
-      case 0x19u:
-LABEL_56:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)v3->_guilds_member_bits, 63)
-          || _49327B(0x1Au, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 27;
-        goto LABEL_4;
       case 0x1Au:
-        if ( !a3 )
-          break;
-        v5 = 65;
-        goto LABEL_82;
+        return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 65));
       case 0x1Bu:
-        if ( !a3 )
-          break;
-        v5 = 67;
-        goto LABEL_82;
-      case 0x1Cu:
-        v8 = a3;
-        v7 = 29;
-        goto LABEL_4;
-      case 0x1Du:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 69)
-          || _49327B(0x1Eu, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 31;
-        goto LABEL_4;
-      case 0x1Eu:
-        if ( !a3 )
-          break;
-        v5 = 71;
-        goto LABEL_82;
-      case 0x1Fu:
-        if ( !a3 )
-          break;
-        v5 = 73;
-        goto LABEL_82;
-      case 0x20u:
-        v8 = a3;
-        v7 = 33;
-        goto LABEL_4;
-      case 0x21u:
-        if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 73)
-          || _49327B(0x22u, a3) )
-          goto LABEL_84;
-        v8 = a3;
-        v7 = 35;
-LABEL_4:
-        v4 = _49327B(v7, v8) == 0;
-        goto LABEL_83;
+        return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 67));
       case 0x22u:
-        if ( !a3 )
-          break;
-        v5 = 77;
-        goto LABEL_82;
+        return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 77));
       case 0x23u:
-        if ( a3 )
-        {
-          v5 = 79;
-LABEL_82:
-          v4 = (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, v5) == 0;
-LABEL_83:
-          if ( !v4 )
-            goto LABEL_84;
-        }
+        return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 79));
         break;
       default:
+        assert("Should not be able to get here" && false);
         break;
     }
-    result = 0;
-  }
-  return result;
+    return false;
+  }
 }