Advertisement
Rochet2

Untitled

Oct 23rd, 2015
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.27 KB | None | 0 0
  1. In Player.cpp in Player::ApplyEnchantment
  2. Change this:
  3.     // visualize enchantment at player and equipped items
  4.     if (slot == PERM_ENCHANTMENT_SLOT)
  5.         SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 0, apply ? item->GetEnchantmentId(slot) : 0);
  6.  
  7.     if (slot == TEMP_ENCHANTMENT_SLOT)
  8.         SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 1, apply ? item->GetEnchantmentId(slot) : 0);
  9.  
  10. to this:
  11.     if (uint32 entry = sEnchantVisuals->GetEnchantVisual(item))
  12.     {
  13.         if (slot == PERM_ENCHANTMENT_SLOT)
  14.             SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 0, apply ? entry : 0);
  15.         if (slot == TEMP_ENCHANTMENT_SLOT)
  16.             SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 1, apply ? entry : 0);
  17.     }
  18.     else
  19.     {
  20.         // visualize enchantment at player and equipped items
  21.         if (slot == PERM_ENCHANTMENT_SLOT)
  22.             SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 0, apply ? item->GetEnchantmentId(slot) : 0);
  23.  
  24.         if (slot == TEMP_ENCHANTMENT_SLOT)
  25.             SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 1, apply ? item->GetEnchantmentId(slot) : 0);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement