if(OppositeRingSlotDoesNotMatchCurrentEquip(comp.lock())){//If we find that the opposite ring slot is equipped to us, this would be an item swap or the exact same ring, therefore no stat calculations apply.
if(OppositeRingSlotDoesNotMatchCurrentEquip(comp.lock())){//If we find that the opposite ring slot is equipped to us, this would be an item swap or the exact same ring, therefore no stat calculations apply.
for(std::weak_ptr<MenuComponent>component:data.parentComponent.lock()->GetComponents()){//HACK ALERT! If we are accessing a parent component, it's because we are dealing with a scrolling window component, which has sub-components. So this should be a safe cast to make.
for(std::weak_ptr<MenuComponent>component:data.parentComponent.lock()->GetComponents()){//HACK ALERT! If we are accessing a parent component, it's because we are dealing with a scrolling window component, which has sub-components. So this should be a safe cast to make.
std::weak_ptr<MenuItemButton>button2=dynamic_pointer_cast<MenuItemButton>(component.lock());//HACK ALERT! This is probably an item since we populated item lists using this name for the components. So we assume these are MenuItemButton classes.
std::weak_ptr<MenuItemButton>button2=DYNAMIC_POINTER_CAST<MenuItemButton>(component.lock());//HACK ALERT! This is probably an item since we populated item lists using this name for the components. So we assume these are MenuItemButton classes.
if(button2.expired())ERR("Could not cast item to a MenuItemButton*!");
if(button2.expired())ERR("Could not cast item to a MenuItemButton*!");
std::weak_ptr<InventoryScrollableWindowComponent>comp=dynamic_pointer_cast<InventoryScrollableWindowComponent>(component.lock());//HACK ALERT! We're assuming that these must be these classes otherwise they have no reason to even be using these listeners. Make sure that the lowest base class that requires these implements these functions!!!
std::weak_ptr<InventoryScrollableWindowComponent>comp=DYNAMIC_POINTER_CAST<InventoryScrollableWindowComponent>(component.lock());//HACK ALERT! We're assuming that these must be these classes otherwise they have no reason to even be using these listeners. Make sure that the lowest base class that requires these implements these functions!!!
std::weak_ptr<InventoryScrollableWindowComponent>comp=dynamic_pointer_cast<InventoryScrollableWindowComponent>(component.lock());//HACK ALERT! We're assuming that these must be these classes otherwise they have no reason to even be using these listeners. Make sure that the lowest base class that requires these implements these functions!!!
std::weak_ptr<InventoryScrollableWindowComponent>comp=DYNAMIC_POINTER_CAST<InventoryScrollableWindowComponent>(component.lock());//HACK ALERT! We're assuming that these must be these classes otherwise they have no reason to even be using these listeners. Make sure that the lowest base class that requires these implements these functions!!!