Skip to content

Commit

Permalink
Fix visual shield add support for dual weapon
Browse files Browse the repository at this point in the history
Note: the dual weapon is actually a fake one using two sprites instead
of only one (containing the two weapons). Need to investigate to know
how the client find the type of a weapon based on its ID (probably
hardcoded).
  • Loading branch information
vthibault committed May 11, 2015
1 parent 7061ba5 commit d18101a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/DB/DBManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,18 @@ define(function(require)
return null;
}

// Dual weapon (based on range id)
if (id > 500 && (id < 2100 || id > 2200)) {
return DB.getWeaponPath(id, job, sex);
}

var baseClass = WeaponJobTable[job] || WeaponJobTable[0];

// ItemID to View Id
if ((id in ItemTable) && ('ClassNum' in ItemTable[id])) {
id = ItemTable[id].ClassNum;
}

return 'data/sprite/\xb9\xe6\xc6\xd0/' + baseClass + '/' + baseClass + '_' + SexTable[sex] + '_' + ( ShieldTable[id] || ShieldTable[1] );
};

Expand All @@ -333,6 +343,11 @@ define(function(require)

var baseClass = WeaponJobTable[job] || WeaponJobTable[0];

// ItemID to View Id
if ((id in ItemTable) && ('ClassNum' in ItemTable[id])) {
id = ItemTable[id].ClassNum;
}

return 'data/sprite/\xc0\xce\xb0\xa3\xc1\xb7/' + baseClass + '/' + baseClass + '_' + SexTable[sex] + ( WeaponTable[id] || ('_' + id) ) ;
};

Expand Down

0 comments on commit d18101a

Please sign in to comment.